function FitSizeAndGuide({product,size,setSize}){ const tpl=FitStore.templateFor(product); const [open,setOpen]=React.useState(false); const hasMeasurements=FitStore.hasMeasurements(tpl); const [fitType,setFitType]=React.useState(tpl.fitTypes?tpl.fitTypes[1]||tpl.fitTypes[0]:null); React.useEffect(()=>{ if(open&&window.lucide)window.lucide.createIcons(); },[open]); return (
{tpl.hasSizeSelector?'Size':'Fit'}
{tpl.hasSizeSelector?tpl.sizes.map(s=>( )):(
Free Size
)}
{open&&(
setOpen(false)} style={{position:'fixed',inset:0,background:'rgba(31,31,31,0.6)',zIndex:500,display:'flex',alignItems:'center',justifyContent:'center',padding:20,overflowY:'auto'}}>
e.stopPropagation()} style={{background:'var(--ivory)',borderRadius:'var(--radius-lg)',maxWidth:520,width:'100%',padding:'32px',boxShadow:'var(--shadow-card)',position:'relative',maxHeight:'88vh',overflowY:'auto'}}>
{tpl.label}

{FitStore.titleFor(tpl)}

{tpl.hasSizeSelector?(hasMeasurements?( {tpl.fitTypes&&(
Fit Type
{tpl.fitTypes.map(f=>())}
)}
{tpl.measureFields.map(f=>())} {tpl.sizes.map((s,i)=>( {tpl.measureFields.map(f=>())} ))}
Size{FitStore.MEASURE_LABELS[f]||f}
{s}{FitStore.measureValue(i,f)}
Measurements are approximate and may vary slightly by ±0.5 inch due to handcrafted finishing.
):(
{tpl.sizes.map(s=>())}
)):( {tpl.specFields.map(f=>( ))}
{FitStore.FIELD_LABELS[f]||f} {FitStore.specValue(product,f)}
)}
)}
); } window.FitSizeAndGuide=FitSizeAndGuide;