{"version":3,"file":"FAQItem.DPi6O8bb.mjs","names":["useState","useId"],"sources":["https:/framerusercontent.com/modules/U5Pi9scHwTIC8yuqv8H9/4Jb0lIM449QPVn0luudk/FAQItem.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useId}from\"react\";import{addPropertyControls,ControlType,useLocaleInfo}from\"framer\";const EASE=\"320ms cubic-bezier(0.22, 1, 0.36, 1)\";/* Plain answers can link with [text](/path). Site paths get the /nl prefix on\n   the Dutch site, so one link works in both languages. */function withLinks(answer,prefix){const parts=[];const re=/\\[([^\\]]+)\\]\\(([^)\\s]+)\\)/g;let last=0;let m;while(m=re.exec(answer)){if(m.index>last)parts.push(answer.slice(last,m.index));const href=m[2].startsWith(\"/\")&&prefix&&!m[2].startsWith(prefix+\"/\")?prefix+m[2]:m[2];parts.push(/*#__PURE__*/_jsx(\"a\",{href:href,children:m[1]},m.index));last=m.index+m[0].length;}if(last<answer.length)parts.push(answer.slice(last));return parts;}export default function FAQItem(props){const{question,answer,answerRich,text,muted,rule,style}=props;const[open,setOpen]=useState(!!props.open);const{activeLocale}=useLocaleInfo();const prefix=activeLocale?.slug?\"/\"+String(activeLocale.slug).replace(/^\\/+|\\/+$/g,\"\"):\"\";const id=useId();const reduceMotion=typeof window!==\"undefined\"&&typeof window.matchMedia===\"function\"&&window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",borderBottom:`1px solid ${rule}`,...style},children:[/*#__PURE__*/_jsxs(\"button\",{type:\"button\",\"aria-expanded\":open,\"aria-controls\":id,onClick:()=>setOpen(o=>!o),style:{display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:24,width:\"100%\",padding:\"24px 0\",border:\"none\",background:\"transparent\",cursor:\"pointer\",textAlign:\"left\",fontFamily:'\"Public Sans\", sans-serif',fontWeight:400,fontSize:19,lineHeight:\"29px\",color:text},children:[/*#__PURE__*/_jsx(\"span\",{children:question}),/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{flex:\"0 0 auto\",width:24,height:24,borderRadius:999,border:`1px solid ${text}`,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"12\",height:\"12\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:text,strokeWidth:\"2.5\",strokeLinecap:\"round\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M5 12h14\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M12 5v14\",style:{transform:open?\"scaleY(0)\":\"scaleY(1)\",transformOrigin:\"center\",transition:reduceMotion?\"none\":\"transform \"+EASE}})]})})]}),/*#__PURE__*/_jsx(\"div\",{id:id,role:\"region\",style:{display:\"grid\",gridTemplateRows:open?\"1fr\":\"0fr\",transition:reduceMotion?\"none\":\"grid-template-rows \"+EASE},children:/*#__PURE__*/_jsx(\"div\",{style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsxs(\"div\",{className:\"curitt-faq-answer\",style:{margin:0,padding:\"0 48px 24px 0\",fontFamily:'\"Public Sans\", sans-serif',fontWeight:400,fontSize:16,lineHeight:\"26px\",color:muted,opacity:open?1:0,transition:reduceMotion?\"none\":\"opacity \"+EASE},children:[/*#__PURE__*/_jsx(\"style\",{children:`.curitt-faq-answer p { margin: 0 0 12px; } .curitt-faq-answer p:last-child { margin-bottom: 0; } .curitt-faq-answer a { color: inherit; text-underline-offset: 0.15em; }`}),answerRich?answerRich:/*#__PURE__*/_jsx(\"p\",{children:withLinks(answer,prefix)})]})})})]});}const defaults={question:\"Question goes here?\",answer:\"Answer copy goes here. Keep it to two or three sentences.\",open:false,text:\"var(--token-e4a4b42c-212e-4a57-8531-1b8ea8d85573, #161512)\",muted:\"var(--token-6c31cc05-eed3-47c8-b09e-ab64cf8aed09, #706F6B)\",rule:\"var(--token-7b514f45-828e-4dd3-b36c-c06744a661e8, #DBD2CB)\"};FAQItem.defaultProps=defaults;addPropertyControls(FAQItem,{question:{type:ControlType.String,title:\"Question\",defaultValue:defaults.question},answer:{type:ControlType.String,title:\"Answer\",displayTextArea:true,defaultValue:defaults.answer},open:{type:ControlType.Boolean,title:\"Start open\",defaultValue:false},text:{type:ControlType.Color,title:\"Text\",defaultValue:defaults.text},muted:{type:ControlType.Color,title:\"Answer text\",defaultValue:defaults.muted},rule:{type:ControlType.Color,title:\"Rule\",defaultValue:defaults.rule}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQItem\",\"slots\":[\"answerRich\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQItem.map"],"mappings":"8MAC0D,SAAS,EAAU,EAAO,EAAO,CAAC,IAAM,EAAM,CAAC,EAAQ,EAAG,6BAAiC,EAAK,EAAM,EAAE,KAAM,EAAE,EAAG,KAAK,CAAM,GAAE,CAAI,EAAE,MAAM,GAAK,EAAM,KAAK,EAAO,MAAM,EAAK,EAAE,KAAK,CAAC,EAAE,IAAM,EAAK,EAAE,EAAE,CAAC,WAAW,GAAG,GAAG,GAAQ,CAAC,EAAE,EAAE,CAAC,WAAW,EAAO,GAAG,EAAE,EAAO,EAAE,GAAG,EAAE,GAAG,EAAM,KAAkB,EAAK,IAAI,CAAM,OAAK,SAAS,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAK,EAAE,MAAM,EAAE,EAAE,CAAC,MAAO,CAAsD,OAAlD,EAAK,EAAO,QAAO,EAAM,KAAK,EAAO,MAAM,CAAI,CAAC,EAAS,CAAM,CAAC,SAAwB,EAAQ,EAAM,CAAC,GAAK,CAAC,WAAS,SAAO,aAAW,OAAK,QAAM,OAAK,SAAO,EAAW,CAAC,EAAK,GAASA,EAAS,CAAC,CAAC,EAAM,IAAI,EAAO,CAAC,gBAAc,EAAc,EAAQ,EAAO,GAAc,KAAK,IAAI,OAAO,EAAa,IAAI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