{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/tHLaXYxm4DNC8dtAH0Cd/NjHnV2rzOObRVYKy9z5j/Valjplats.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function CustomRadioGroup(props){const{options,defaultOption,direction,gap,fontFamily,fontSize,color,borderColor,borderWidth,backgroundColor,required,onChange}=props;const[selected,setSelected]=useState(defaultOption);const[error,setError]=useState(\"\");const handleChange=value=>{setSelected(value);setError(\"\")// Tar bort felmeddelandet n\u00E4r ett val g\u00F6rs\n;if(onChange)onChange(value);};return /*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:direction,gap:`${gap}px`,backgroundColor:backgroundColor,padding:\"10px\",border:`${borderWidth}px solid ${borderColor}`,borderRadius:\"8px\",overflowX:\"auto\",whiteSpace:\"nowrap\"},children:options.map((option,index)=>/*#__PURE__*/_jsxs(\"label\",{style:{display:\"inline-flex\",alignItems:\"center\",cursor:\"pointer\",fontFamily:fontFamily,fontSize:`${fontSize}px`,color:color,marginRight:\"16px\",flexShrink:0},children:[/*#__PURE__*/_jsx(\"input\",{type:\"radio\",name:\"custom-radio-group\",value:option.value,checked:selected===option.value,onChange:()=>handleChange(option.value),required:required,style:{marginRight:\"8px\"}}),option.label]},option.value||index))}),error&&/*#__PURE__*/_jsx(\"p\",{style:{color:\"red\",marginTop:\"5px\"},children:error})]});}// \uD83D\uDD39 Property controls f\u00F6r att \u00E4ndra styling i Framer UI\naddPropertyControls(CustomRadioGroup,{options:{type:ControlType.Array,title:\"Alternativ\",propertyControl:{type:ControlType.Object,controls:{label:{type:ControlType.String,title:\"Label\"},value:{type:ControlType.String,title:\"Value\"}}},defaultValue:[{label:\"Alternativ 1\",value:\"1\"},{label:\"Alternativ 2\",value:\"2\"}]},defaultOption:{type:ControlType.String,title:\"F\\xf6rvalt alternativ\",defaultValue:\"1\"},direction:{type:ControlType.SegmentedEnum,title:\"Riktning\",options:[\"row\",\"column\"],optionTitles:[\"Horisontell\",\"Vertikal\"],defaultValue:\"row\"},gap:{type:ControlType.Number,title:\"Mellanrum\",min:0,max:50,defaultValue:10},fontFamily:{type:ControlType.String,title:\"Typsnitt\",defaultValue:\"Arial\"},fontSize:{type:ControlType.Number,title:\"Textstorlek\",min:8,max:72,defaultValue:16},color:{type:ControlType.Color,title:\"Textf\\xe4rg\",defaultValue:\"#ffffff\"},borderColor:{type:ControlType.Color,title:\"Kantf\\xe4rg\",defaultValue:\"#cccccc\"},borderWidth:{type:ControlType.Number,title:\"Kanttjocklek\",min:0,max:10,defaultValue:1},backgroundColor:{type:ControlType.Color,title:\"Bakgrundsf\\xe4rg\",defaultValue:\"transparent\"},required:{type:ControlType.Boolean,title:\"Obligatoriskt val\",defaultValue:true},onChange:{type:ControlType.EventHandler,title:\"Vid f\\xf6r\\xe4ndring\"}});export default CustomRadioGroup// \uD83D\uDC48 Se till att exporten \u00E4r korrekt\n;\nexport const __FramerMetadata__ = {\"exports\":{\"CustomRadioGroup\":{\"type\":\"reactComponent\",\"name\":\"CustomRadioGroup\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"CustomRadioGroup\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Valjplats.map"],
  "mappings": "uGAAgJ,SAASA,EAAiBC,EAAM,CAAC,GAAK,CAAC,QAAAC,EAAQ,cAAAC,EAAc,UAAAC,EAAU,IAAAC,EAAI,WAAAC,EAAW,SAAAC,EAAS,MAAAC,EAAM,YAAAC,EAAY,YAAAC,EAAY,gBAAAC,EAAgB,SAAAC,EAAS,SAAAC,CAAQ,EAAEZ,EAAW,CAACa,EAASC,CAAW,EAAEC,EAASb,CAAa,EAAO,CAACc,EAAMC,CAAQ,EAAE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CAAC,CAAC,EAAE,cAAc,CAAC,KAAKA,EAAY,OAAO,MAAM,wBAAwB,aAAa,GAAG,EAAE,UAAU,CAAC,KAAKA,EAAY,cAAc,MAAM,WAAW,QAAQ,CAAC,MAAM,QAAQ,EAAE,aAAa,CAAC,cAAc,UAAU,EAAE,aAAa,KAAK,EAAE,IAAI,CAAC,KAAKA,EAAY,OAAO,MAAM,YAAY,IAAI,EAAE,IAAI,GAAG,aAAa,EAAE,EAAE,WAAW,CAAC,KAAKA,EAAY,OAAO,MAAM,WAAW,aAAa,OAAO,EAAE,SAAS,CAAC,KAAKA,EAAY,OAAO,MAAM,cAAc,IAAI,EAAE,IAAI,GAAG,aAAa,EAAE,EAAE,MAAM,CAAC,KAAKA,EAAY,MAAM,MAAM,cAAc,aAAa,SAAS,EAAE,YAAY,CAAC,KAAKA,EAAY,MAAM,MAAM,cAAc,aAAa,SAAS,EAAE,YAAY,CAAC,KAAKA,EAAY,OAAO,MAAM,eAAe,IAAI,EAAE,IAAI,GAAG,aAAa,CAAC,EAAE,gBAAgB,CAAC,KAAKA,EAAY,MAAM,MAAM,mBAAmB,aAAa,aAAa,EAAE,SAAS,CAAC,KAAKA,EAAY,QAAQ,MAAM,oBAAoB,aAAa,EAAI,EAAE,SAAS,CAAC,KAAKA,EAAY,aAAa,MAAM,sBAAsB,CAAC,CAAC",
  "names": ["CustomRadioGroup", "props", "options", "defaultOption", "direction", "gap", "fontFamily", "fontSize", "color", "borderColor", "borderWidth", "backgroundColor", "required", "onChange", "selected", "setSelected", "ye", "error", "setError", "handleChange", "value", "u", "p", "option", "index", "addPropertyControls", "ControlType"]
}
