{"version":3,"file":"FAQMini.DuCKjFFZ.mjs","names":["React.useState","React.useMemo","p"],"sources":["https:/framerusercontent.com/modules/yBEZJfl0S2FAwgmIpdjH/LYrB8MWiBvDhLVHkHyda/FAQMini.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";function stripTags(s){if(!s)return\"\";return s.replace(/<[^>]*>/g,\" \").replace(/\\s+/g,\" \").trim();}/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export default function FAQMini(props){const{heading,showHeading,items,headingColor,questionColor,answerColor,dividerColor,iconColor,headingFont,questionFont,answerFont,answerFontSize,maxWidth,paddingDesktop,paddingTablet,paddingMobile,itemSpacing,enableSchema,enableAnalytics,analyticsEventName}=props;const safe=Array.isArray(items)?items:[];const[open,setOpen]=React.useState(new Set);const uid=React.useMemo(()=>Math.random().toString(36).slice(2),[]);const toggle=i=>{if(enableAnalytics&&safe[i]?.question&&typeof window!==\"undefined\"){const w=window;if(typeof w.gtag===\"function\")w.gtag(\"event\",analyticsEventName||\"faq_toggle\",{question:safe[i].question,action:open.has(i)?\"close\":\"open\"});}setOpen(p=>{const n=new Set(p);n.has(i)?n.delete(i):n.add(i);return n;});};const schema=React.useMemo(()=>{if(!enableSchema)return\"\";return JSON.stringify({\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",mainEntity:safe.map(x=>({\"@type\":\"Question\",name:stripTags(x.question),acceptedAnswer:{\"@type\":\"Answer\",text:stripTags(x.answer)}}))});},[enableSchema,safe]);return /*#__PURE__*/_jsxs(\"section\",{className:\"fm-s\",\"aria-labelledby\":`fm-h-${uid}`,children:[/*#__PURE__*/_jsx(\"style\",{children:`.fm-s{width:100%;display:flex;justify-content:center;padding:${paddingDesktop}px 32px}@media(max-width:810px){.fm-s{padding:${paddingTablet}px 24px}}@media(max-width:600px){.fm-s{padding:${paddingMobile}px 24px}}.fm-t:focus-visible{outline:2px solid rgba(138,107,61,.35);outline-offset:4px;border-radius:10px}.fm-t{-webkit-tap-highlight-color:transparent}.fm-t:hover{opacity:.7}.fm-i{transition:transform .3s ease;transform:rotate(0);transform-origin:center;display:flex;align-items:center;justify-content:center;user-select:none}.fm-i--o{transform:rotate(180deg)}@media(max-width:600px){.fm-i{font-size:24px!important;width:24px!important;height:24px!important}}`}),/*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",maxWidth},children:[showHeading&&heading&&/*#__PURE__*/_jsx(\"h2\",{id:`fm-h-${uid}`,style:{...headingFont,color:headingColor,margin:0,marginBottom:40},children:heading}),/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{height:1,background:dividerColor}}),safe.map((item,i)=>{const o=open.has(i);return /*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsxs(\"div\",{style:{paddingTop:itemSpacing,paddingBottom:itemSpacing},children:[/*#__PURE__*/_jsxs(\"button\",{type:\"button\",className:\"fm-t\",onClick:()=>toggle(i),\"aria-expanded\":o,\"aria-controls\":`fm-a-${uid}-${i}`,style:{width:\"100%\",display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",gap:24,background:\"none\",border:\"none\",padding:0,cursor:\"pointer\",textAlign:\"left\",transition:\"opacity .2s ease\"},children:[/*#__PURE__*/_jsx(\"h3\",{style:{...questionFont,color:questionColor,flex:1,margin:0},children:item.question}),/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",className:`fm-i ${o?\"fm-i--o\":\"\"}`,style:{color:iconColor,fontSize:20,lineHeight:1,flexShrink:0,width:24,height:24},children:o?\"−\":\"+\"})]}),/*#__PURE__*/_jsx(\"div\",{id:`fm-a-${uid}-${i}`,style:{display:\"grid\",gridTemplateRows:o?\"1fr\":\"0fr\",transition:\"grid-template-rows .3s ease\"},children:/*#__PURE__*/_jsx(\"div\",{style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{...answerFont,fontSize:answerFontSize,lineHeight:\"1.55\",color:answerColor,paddingTop:12,paddingRight:48,opacity:o?1:0,transition:\"opacity .3s ease\"},children:item.answer})})})]}),/*#__PURE__*/_jsx(\"div\",{style:{height:1,background:dividerColor}})]},i);})]}),enableSchema&&schema&&/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:schema}})]})]});}addPropertyControls(FAQMini,{showHeading:{type:ControlType.Boolean,title:\"Show Heading\",defaultValue:true},heading:{type:ControlType.String,title:\"Heading\",defaultValue:\"Perguntas frequentes\",hidden:p=>!p.showHeading},items:{type:ControlType.Array,title:\"FAQ Items\",control:{type:ControlType.Object,controls:{question:{type:ControlType.String,title:\"Question\",defaultValue:\"Pergunta\"},answer:{type:ControlType.String,title:\"Answer\",defaultValue:\"Resposta.\",displayTextArea:true}}},defaultValue:[{question:\"O que inclui a avalia\\xe7\\xe3o t\\xe9cnica?\",answer:\"Diagn\\xf3stico do estado de conserva\\xe7\\xe3o, registo fotogr\\xe1fico, identifica\\xe7\\xe3o de patologias e proposta de interven\\xe7\\xe3o.\"},{question:\"Trabalham com qualquer tipo de obra?\",answer:\"Trabalhamos com pintura, escultura, cer\\xe2mica, talha dourada, mobili\\xe1rio, metais e documentos gr\\xe1ficos. Se tiver d\\xfavida sobre o tipo de obra, envie fotografias e fazemos a triagem.\"},{question:\"A informa\\xe7\\xe3o que envio \\xe9 confidencial?\",answer:\"Sim. Toda a informa\\xe7\\xe3o \\xe9 tratada com discri\\xe7\\xe3o e n\\xe3o \\xe9 partilhada com terceiros.\"},{question:\"A interven\\xe7\\xe3o altera o aspeto original da pe\\xe7a?\",answer:\"O objetivo \\xe9 sempre preservar, n\\xe3o renovar. Qualquer interven\\xe7\\xe3o est\\xe9tica \\xe9 discutida previamente.\"},{question:\"Fazem desloca\\xe7\\xf5es fora do Porto?\",answer:\"Sim. Trabalhamos em todo o territ\\xf3rio nacional.\"},{question:\"Em quanto tempo recebo resposta?\",answer:\"Respondemos em 48 horas \\xfateis.\"}]},headingColor:{type:ControlType.Color,title:\"Heading Color\",defaultValue:\"#2B2423\"},questionColor:{type:ControlType.Color,title:\"Question Color\",defaultValue:\"#2B2423\"},answerColor:{type:ControlType.Color,title:\"Answer Color\",defaultValue:\"#6B6460\"},dividerColor:{type:ControlType.Color,title:\"Divider Color\",defaultValue:\"#D8D2C6\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#2B2423\"},headingFont:{type:ControlType.Font,title:\"Heading Font\",controls:\"extended\"},questionFont:{type:ControlType.Font,title:\"Question Font\",controls:\"extended\"},answerFont:{type:ControlType.Font,title:\"Answer Font\",controls:\"extended\"},answerFontSize:{type:ControlType.Number,title:\"Answer Size\",defaultValue:14,min:12,max:18,step:1,unit:\"px\"},maxWidth:{type:ControlType.Number,title:\"Max Width\",defaultValue:760,min:400,max:1200,step:20,unit:\"px\"},paddingDesktop:{type:ControlType.Number,title:\"Padding Desktop\",defaultValue:64,min:0,max:200,step:8,unit:\"px\"},paddingTablet:{type:ControlType.Number,title:\"Padding Tablet\",defaultValue:48,min:0,max:200,step:8,unit:\"px\"},paddingMobile:{type:ControlType.Number,title:\"Padding Mobile\",defaultValue:40,min:0,max:200,step:8,unit:\"px\"},itemSpacing:{type:ControlType.Number,title:\"Item Spacing\",defaultValue:20,min:8,max:48,step:4,unit:\"px\"},enableSchema:{type:ControlType.Boolean,title:\"Enable Schema\",defaultValue:true},enableAnalytics:{type:ControlType.Boolean,title:\"Analytics (gtag)\",defaultValue:false},analyticsEventName:{type:ControlType.String,title:\"Event Name\",defaultValue:\"faq_toggle\",hidden:p=>!p.enableAnalytics}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQMini\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{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