{"version":3,"file":"Select_service.3m6KFGaR.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/ZC2FSbWJfyKHgl5hXwwB/o9YEpKMN347a7kqDB6Tj/Select_service.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";const defaultOptions=[{label:\"Option A\",image:\"https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=400\"},{label:\"Option B\",image:\"https://images.unsplash.com/photo-1505118380757-91f5f5632de0?w=400\"},{label:\"Option C\",image:\"https://images.unsplash.com/photo-1509316785289-025f5b846b35?w=400\"}];export default function ImageRadioGroup({options,borderColor,borderWidth,borderRadius,itemWidth,gap,fieldName,onValueChange}){const[selected,setSelected]=useState(options[0]?.label??null);const handleSelect=label=>{setSelected(label);onValueChange?.(label);};return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"grid\",gridTemplateColumns:`repeat(auto-fit, minmax(${itemWidth}px, 1fr))`,columnGap:gap,rowGap:gap/2,alignItems:\"start\",width:\"100%\",paddingBottom:0,marginBottom:0},children:[/*#__PURE__*/_jsx(\"input\",{type:\"hidden\",name:fieldName,value:selected??\"\",readOnly:true,style:{position:\"absolute\",opacity:0,pointerEvents:\"none\",width:0,height:0}}),options.map(({label,image})=>{const isSelected=selected===label;return /*#__PURE__*/_jsxs(\"div\",{onClick:()=>handleSelect(label),style:{cursor:\"pointer\",borderRadius,overflow:\"hidden\",border:\"none\",transition:\"border 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease\",position:\"relative\",boxSizing:\"border-box\",width:\"100%\",maxWidth:itemWidth,justifySelf:\"center\"},onMouseEnter:e=>!isSelected&&(e.currentTarget.style.transform=\"translateY(-2px)\"),onMouseLeave:e=>e.currentTarget.style.transform=\"none\",children:[/*#__PURE__*/_jsx(\"img\",{src:image,alt:label,style:{display:\"block\",width:\"100%\",aspectRatio:\"1\",objectFit:\"contain\",borderRadius,border:`${borderWidth}px solid ${isSelected?borderColor:\"transparent\"}`,boxSizing:\"border-box\"}}),/*#__PURE__*/_jsx(\"div\",{style:{padding:\"2px\",fontSize:13,fontWeight:500,textAlign:\"center\",color:isSelected?borderColor:\"#4B5554\",display:\"flex\",alignItems:\"flex-start\",justifyContent:\"center\"},children:label})]},label);})]});}ImageRadioGroup.defaultProps={options:defaultOptions,borderColor:\"#7F77DD\",borderWidth:3,borderRadius:12,itemWidth:120,gap:12,fieldName:\"service\"};addPropertyControls(ImageRadioGroup,{options:{type:ControlType.Array,control:{type:ControlType.Object,controls:{label:{type:ControlType.String},image:{type:ControlType.Image}}}},borderColor:{type:ControlType.Color,title:\"Selected color\"},borderWidth:{type:ControlType.Number,min:1,max:6,title:\"Border width\"},borderRadius:{type:ControlType.Number,min:0,max:32,title:\"Border radius\"},itemWidth:{type:ControlType.Number,min:60,max:300,title:\"Item width\"},gap:{type:ControlType.Number,min:4,max:40,title:\"Gap\"},fieldName:{type:ControlType.String,title:\"Field name\"},onValueChange:{type:ControlType.EventHandler}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImageRadioGroup\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Select_service.map"],"mappings":"kLAA0b,SAAwB,EAAgB,CAAC,UAAQ,cAAY,cAAY,eAAa,YAAU,MAAI,YAAU,iBAAe,CAAC,GAAK,CAAC,EAAS,GAAaA,EAAS,EAAQ,EAAE,EAAE,OAAO,IAAI,EAAQ,EAAa,GAAO,CAAC,EAAY,CAAK,EAAE,IAAgB,CAAK,CAAE,EAAE,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,oBAAoB,2BAA2B,EAAU,WAAW,UAAU,EAAI,OAAO,EAAI,EAAE,WAAW,QAAQ,MAAM,OAAO,cAAc,EAAE,aAAa,CAAC,EAAE,SAAS,CAAc,EAAK,QAAQ,CA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