{"version":3,"file":"ShallowsFAQ.BFhanydI.mjs","names":["useState","__esmMin","_e","p","c","init_jsx_runtime","init_npm_react_18_3_1","init_framer_BWFVvmND","ControlType","addPropertyControls","ShallowsFAQ","props","open","setOpen","firstOpen","pick","base","f","qFont","questionFont","aFont","answerFont","items","isOpen","i","cardColor","radius","questionColor","questionSize","item","iconColor","answerColor","answerSize","init_ShallowsFAQ"],"sources":["https:/framerusercontent.com/modules/z8nPqX3JPNp6Whi4A4e1/ri19zdi2lA8qFnju1iz1/ShallowsFAQ.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";/**\n * FAQ accordion for the Shallows template: one rounded card per question. Edit the questions in the right panel.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function ShallowsFAQ(props){const{items,questionFont,answerFont,questionSize,answerSize,questionColor,answerColor,iconColor,cardColor,radius,gap,firstOpen}=props;const[open,setOpen]=useState(firstOpen?0:-1);// Font controls placed by a plugin can arrive empty (or as a bare generic family): fall back to the template font\nconst pick=(f,base)=>({...base,...f&&f.fontFamily&&!/^(sans-serif|serif|system-ui)$/i.test(f.fontFamily)?f:{}});const qFont=pick(questionFont,{fontFamily:'\"Figtree\", \"Figtree Placeholder\", sans-serif',fontWeight:600,lineHeight:\"1.35em\"});const aFont=pick(answerFont,{fontFamily:'\"Figtree\", \"Figtree Placeholder\", sans-serif',fontWeight:400,lineHeight:\"1.55em\"});return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",display:\"flex\",flexDirection:\"column\",gap},children:items.map((item,i)=>{const isOpen=open===i;return /*#__PURE__*/_jsxs(\"div\",{style:{background:cardColor,borderRadius:radius,padding:\"0 28px\"},children:[/*#__PURE__*/_jsxs(\"button\",{onClick:()=>setOpen(isOpen?-1:i),\"aria-expanded\":isOpen,style:{all:\"unset\",boxSizing:\"border-box\",width:\"100%\",cursor:\"pointer\",display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",gap:24,padding:\"24px 0\",color:questionColor,...qFont,fontSize:questionSize},children:[/*#__PURE__*/_jsx(\"span\",{children:item.question}),/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":true,style:{color:iconColor,fontSize:26,fontWeight:400,lineHeight:1,transition:\"transform .25s\",transform:isOpen?\"rotate(45deg)\":\"none\"},children:\"+\"})]}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"grid\",gridTemplateRows:isOpen?\"1fr\":\"0fr\",transition:\"grid-template-rows .3s ease\"},children:/*#__PURE__*/_jsx(\"div\",{style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,padding:\"0 40px 24px 0\",color:answerColor,...aFont,fontSize:answerSize},children:item.answer})})})]},i);})});}addPropertyControls(ShallowsFAQ,{items:{type:ControlType.Array,title:\"Questions\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\"},answer:{type:ControlType.String,title:\"Answer\",displayTextArea:true}}},defaultValue:[{question:\"What happens at the free assessment?\",answer:\"A teacher spends 20 minutes in the water with your child, checks their skills and places them in the right stage. There's no obligation to sign up.\"},{question:\"Do I need to get in the water too?\",answer:\"Only in Parent & Baby classes, up to age 3. From Stage 1 your child swims with the teacher while you watch from the gallery.\"},{question:\"What should my child bring?\",answer:\"A swimsuit, a towel and goggles if they like them. Under-3s need a swim nappy. We lend kickboards, floats and noodles.\"},{question:\"What if we miss a lesson?\",answer:\"Book a free make-up lesson in any class at the same stage during the same term, using the app.\"},{question:\"How warm is the pool?\",answer:\"Our teaching pool is kept at 32\\xb0C all year round, and it's only 1.1 metres at the deepest point.\"}]},firstOpen:{type:ControlType.Boolean,title:\"First open\",defaultValue:true},questionFont:{type:ControlType.Font,title:\"Question font\",controls:\"extended\",defaultValue:{fontFamily:\"Figtree\",fontSize:18,fontWeight:600,lineHeight:\"1.35em\"}},answerFont:{type:ControlType.Font,title:\"Answer font\",controls:\"extended\",defaultValue:{fontFamily:\"Figtree\",fontSize:16,fontWeight:400,lineHeight:\"1.55em\"}},questionSize:{type:ControlType.Number,title:\"Question size\",defaultValue:18,min:12,max:40,unit:\"px\"},answerSize:{type:ControlType.Number,title:\"Answer size\",defaultValue:16,min:12,max:32,unit:\"px\"},questionColor:{type:ControlType.Color,title:\"Question\",defaultValue:\"#0E2F3A\"},answerColor:{type:ControlType.Color,title:\"Answer\",defaultValue:\"#5D7377\"},iconColor:{type:ControlType.Color,title:\"Icon\",defaultValue:\"#1D7FA6\"},cardColor:{type:ControlType.Color,title:\"Card\",defaultValue:\"#FFFFFF\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:18,min:0,max:40,unit:\"px\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:10,min:0,max:40,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ShallowsFAQ\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ShallowsFAQ.map"],"mappings":"A,iLAKG,SAAwBU,EAAY,EAAM,CAAC,GAAK,CAAC,QAAM,eAAa,aAAW,eAAa,aAAW,gBAAc,cAAY,YAAU,YAAU,SAAO,MAAI,aAAWC,EAAW,CAACC,EAAKC,GAASb,EAASc,EAAU,EAAE,EAAE,EACzNC,GAAM,EAAE,KAAQ,CAAC,GAAGC,EAAK,GAAGC,GAAGA,EAAE,YAAY,CAAC,kCAAkC,KAAKA,EAAE,UAAU,EAAEA,EAAE,CAAC,CAAC,GAASC,EAAMH,EAAKI,EAAa,CAAC,WAAW,+CAA+C,WAAW,IAAI,WAAW,QAAQ,CAAC,EAAQC,EAAML,EAAKM,EAAW,CAAC,WAAW,+CAA+C,WAAW,IAAI,WAAW,QAAQ,CAAC,EAAE,MAAoB,gBAAK,MAAM,CAAC,MA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