{"version":3,"file":"MarketplaceFunnelSection-wdwRY8lj.js","sources":["../../../app/javascript/components/molecules/Marketplace/StageSelector.tsx","../../../app/javascript/components/molecules/Marketplace/CategoryDetails.tsx","../../../app/javascript/components/molecules/Marketplace/MarketplaceFunnelSection.tsx"],"sourcesContent":["import clsx from 'clsx'\n\ntype StageSelectorProps = {\n stages: string[]\n selectedStage: string\n onStageSelect: (stage: string) => void\n}\n\nconst StageSelector = ({ stages, selectedStage, onStageSelect }: StageSelectorProps) => {\n return (\n <div className='flex flex-col bg-maastricht-blue text-white md:h-[38.5625rem] w-full md:w-[18.875rem] md:mb-0 rounded-tl-lg rounded-bl-lg border border-gray-200 overflow-auto'>\n <h2 className='flex flex-start p-[1rem] text-white text-[0.75rem] font-normal uppercase leading-[2rem]'>\n Select Stage:\n </h2>\n <div className='px-[0.5rem]'>\n {stages.map((stage, index) => (\n <p\n key={index}\n onClick={() => onStageSelect(stage)}\n className={clsx(\n 'ml-[1rem] flex cursor-pointer items-center border-b-[0.0625rem] border-r-[0.125rem] border-cyan pb-[1rem] pl-[1rem] pr-[0.75rem] pt-[1.25rem] text-[1rem]',\n {\n 'border-b-ship-grey font-bold': selectedStage === stage,\n 'border-b-ship-grey border-r-transparent': selectedStage !== stage,\n },\n )}\n >\n {stage}\n </p>\n ))}\n </div>\n </div>\n )\n}\n\nexport default StageSelector\n","import clsx from 'clsx'\nimport { Link } from '@inertiajs/react'\n\ntype ParentCategory = {\n title: string\n description: string\n painPoints: string[]\n}\n\ntype FunnelCategory = {\n name: string\n slug: string\n}\n\ntype CategoryDetailsProps = {\n parentCategory: ParentCategory\n funnelCategories: FunnelCategory[][]\n selectedStage: string\n selectedCategoryIndex: number\n onCategoryClick: (index: number) => void\n}\n\nconst CategoryDetails = ({\n parentCategory,\n funnelCategories,\n selectedStage,\n selectedCategoryIndex,\n onCategoryClick,\n}: CategoryDetailsProps) => {\n return (\n <div\n className='flex-1 bg-white h-auto md:h-[38.5625rem] w-full md:w-[72.125rem] flex flex-col border border-gray-200 p-[1rem] md:p-[1.5rem] rounded-tr-lg rounded-br-lg'\n style={{ boxShadow: 'rgba(0, 0, 0, 0.08) 0rem 0.125rem 1.25rem 0rem' }}\n >\n {parentCategory && (\n <>\n <h1 className='text-[1.5rem] mb-[0.5rem] text-black font-bold'>\n {parentCategory.title}\n </h1>\n <p className='mb-[1rem] text-[1rem]'>{parentCategory.description}</p>\n <div>\n {parentCategory.painPoints && (\n <><h2 className='font-semibold text-[1rem] mb-[0.5rem]'>Pain points:</h2><ul className='list-disc list-inside text-funnel-gray p-[0.5rem] text-[1rem] font-medium leading-[25px]'>\n {parentCategory.painPoints.map((point, index) => (\n <li key={index}>{point}</li>\n ))}\n </ul></>\n )}\n </div>\n </>\n )}\n <div className='border-t border-gray-300 my-[1.5rem]'></div>\n <h2 className='text-[0.85rem] mb-[0.5rem] text-blue-smoke'>\n Select Category\n </h2>\n <div className='grid grid-cols-1 md:grid-cols-2 gap-[0.5rem] overflow-auto mb-[1rem]'>\n {funnelCategories[selectedStage].map((obj, index) => (\n <div\n key={index}\n onClick={() => onCategoryClick(index)}\n className={clsx(\n 'py-[0.5rem] px-[1rem] rounded-lg cursor-pointer text-light-grey',\n {\n 'bg-gray-200': selectedCategoryIndex === index,\n 'hover:bg-gray-100': selectedCategoryIndex !== index,\n },\n )}\n >\n <Link\n href={`/categories/${obj.slug}`}\n className='text-[1rem] leading-[1.5] font-normal text-light-grey'\n >\n {obj.name}\n </Link>\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nexport default CategoryDetails\n","import { useState } from 'react'\nimport { ParentCategories } from '@/utils/constants'\nimport StageSelector from './StageSelector'\nimport CategoryDetails from './CategoryDetails'\n\nconst MarketplaceFunnelSection = ({ funnelCategories }) => {\n const [selectedStage, setSelectedStage] = useState(\n Object.keys(funnelCategories)[0],\n )\n const [selectedCategoryIndex, setSelectedCategoryIndex] = useState(null)\n\n const handleStageSelect = (stage) => {\n setSelectedStage(stage)\n setSelectedCategoryIndex(null) \n }\n\n const handleCategoryClick = (index) => {\n setSelectedCategoryIndex(index)\n }\n\n const matchingParentCategoryIndex = ParentCategories.findIndex(\n (_, index) => index === Object.keys(funnelCategories).indexOf(selectedStage)\n )\n\n return (\n <div className='flex flex-col '>\n <p className='mb-[1.5rem] lg:my-[2rem] text-center text-[2.125rem] lg:text-[2.375rem] font-extrabold'>\n Find solutions for any hiring challenge\n </p>\n <div className='flex flex-col md:flex-row rounded-lg'>\n <StageSelector\n stages={Object.keys(funnelCategories)}\n selectedStage={selectedStage}\n onStageSelect={handleStageSelect}\n />\n <CategoryDetails\n parentCategory={ParentCategories[matchingParentCategoryIndex]}\n funnelCategories={funnelCategories}\n selectedStage={selectedStage}\n selectedCategoryIndex={selectedCategoryIndex}\n onCategoryClick={handleCategoryClick}\n />\n </div>\n </div>\n )\n}\n\nexport default MarketplaceFunnelSection\n"],"names":["StageSelector","stages","selectedStage","onStageSelect","className","children","_jsx","map","stage","index","onClick","clsx","CategoryDetails","parentCategory","funnelCategories","selectedCategoryIndex","onCategoryClick","style","boxShadow","_jsxs","_Fragment","title","description","painPoints","point","obj","Link","href","slug","name","MarketplaceFunnelSection","setSelectedStage","useState","Object","keys","setSelectedCategoryIndex","handleStageSelect","handleCategoryClick","matchingParentCategoryIndex","ParentCategories","findIndex","_","indexOf"],"mappings":"oHAQA,MAAMA,EAAgBA,CAAC,CAAEC,OAAAA,EAAQC,cAAAA,EAAeC,cAAAA,CAAkC,MAE9E,MAAA,CAAKC,UAAU,kKAAiKC,UAChLC,EAAA,KAAA,CAAIF,UAAU,0FAAyFC,SAAC,eAAA,CAEpG,EACJC,EAAA,MAAA,CAAKF,UAAU,cAAaC,SACzBJ,EAAOM,IAAI,CAACC,EAAOC,MAClB,IAAA,CAEEC,QAASA,IAAMP,EAAcK,CAAK,EAClCJ,UAAWO,EACT,4JACA,CACE,+BAAgCT,IAAkBM,EAClD,0CAA2CN,IAAkBM,CAAAA,CAEjE,EAAEH,SAEDG,CAAK,EAVDC,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