{"version":3,"file":"CuspFAQ.FTydDaB4.mjs","names":["useState","__esmMin","_e","p","c","init_jsx_runtime","init_npm_react_18_3_1","init_framer_Bf4_tcb2","addPropertyControls","ControlType","CuspFAQ","props","open","setOpen","firstOpen","pick","base","f","qFont","questionFont","aFont","answerFont","lineColor","items","isOpen","i","questionColor","questionSize","item","iconColor","answerColor","answerSize","init_CuspFAQ"],"sources":["https:/framerusercontent.com/modules/uQOpvdgxv8qLs8HNcA9m/4DRqb0YqcNSj99cLiLDY/CuspFAQ.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 Cusp template: questions split by hairlines, a coral plus. Edit the questions in the right panel.\n * The defaults are the First visit questions; on First visit and Care plan, the FAQ button copies each page's own questions in.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function CuspFAQ(props){const{items,questionFont,answerFont,questionSize,answerSize,questionColor,answerColor,iconColor,lineColor,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:'\"Gloock\", \"Gloock Placeholder\", serif',fontWeight:400,lineHeight:\"1.15em\",letterSpacing:\"-0.01em\"});const aFont=pick(answerFont,{fontFamily:'\"Hanken Grotesk\", \"Hanken Grotesk Placeholder\", sans-serif',fontWeight:400,lineHeight:\"1.55em\"});return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",display:\"flex\",flexDirection:\"column\",borderTop:`1px solid ${lineColor}`},children:items.map((item,i)=>{const isOpen=open===i;return /*#__PURE__*/_jsxs(\"div\",{style:{borderBottom:`1px solid ${lineColor}`},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:\"26px 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 26px 0\",color:answerColor,...aFont,fontSize:answerSize},children:item.answer})})})]},i);})});}addPropertyControls(CuspFAQ,{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:\"I haven't been to a dentist in years. Is that a problem?\",answer:\"Not at all, and you won't get a lecture. Lots of our patients start exactly there. We'll take a look, explain what we see and go at whatever pace suits you.\"},{question:\"Can I bring someone with me?\",answer:\"Yes. A friend or family member is welcome in the room, and children can bring a toy or a parent into the chair.\"},{question:\"What if I need a break in the middle?\",answer:\"Raise your hand and we stop, every time. You can sit up, have some water and carry on when you're ready.\"},{question:\"How do I cancel?\",answer:\"Free up to 24 hours before. Reply to your reminder text or call us, and we'll find you another time.\"}]},firstOpen:{type:ControlType.Boolean,title:\"First open\",defaultValue:true},questionFont:{type:ControlType.Font,title:\"Question font\",controls:\"extended\",defaultValue:{fontFamily:\"Gloock\",fontSize:30,fontWeight:400,lineHeight:\"1.15em\"}},answerFont:{type:ControlType.Font,title:\"Answer font\",controls:\"extended\",defaultValue:{fontFamily:\"Hanken Grotesk\",fontSize:17,fontWeight:400,lineHeight:\"1.55em\"}},questionSize:{type:ControlType.Number,title:\"Question size\",defaultValue:30,min:12,max:40,unit:\"px\"},answerSize:{type:ControlType.Number,title:\"Answer size\",defaultValue:17,min:12,max:32,unit:\"px\"},questionColor:{type:ControlType.Color,title:\"Question\",defaultValue:\"#10211F\"},answerColor:{type:ControlType.Color,title:\"Answer\",defaultValue:\"#5D6764\"},iconColor:{type:ControlType.Color,title:\"Icon\",defaultValue:\"#E26D5C\"},lineColor:{type:ControlType.Color,title:\"Lines\",defaultValue:\"#D9D2C3\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CuspFAQ\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CuspFAQ.map"],"mappings":"A,iLAMG,SAAwBU,EAAQ,EAAM,CAAC,GAAK,CAAC,QAAM,eAAa,aAAW,eAAa,aAAW,gBAAc,cAAY,YAAU,YAAU,aAAWC,EAAW,CAACC,EAAKC,GAASb,EAASc,EAAU,EAAE,EAAE,EAC1MC,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,wCAAwC,WAAW,IAAI,WAAW,SAAS,cAAc,SAAS,CAAC,EAAQC,EAAML,EAAKM,EAAW,CAAC,WAAW,6DAA6D,WAAW,IAAI,WAAW,QAAQ,CAAC,EAAE,MAAoB,gBAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,QAAQ,OAAO,cAAc,SAAS,UAAU,aAAaC,GAAW,EAAE,SAASC,EAAM,KAAK,EAAK,IAAI,CAAC,IAAMC,EAA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