{"version":3,"file":"KnobletFAQ.BeTDb2Js.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/QfoY3icVzJFbcL43l5lU/zXPgKmDZGNq28nU4l3Lh/KnobletFAQ.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef,useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{K,FONT,useKit,displayStyle,handStyle,Button,Label,toHex}from\"https://framerusercontent.com/modules/vMYRAbwJiiCvDaoeIGjg/qRPmze7vCQYK1IMffSCA/KnobletKit.js\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any-prefer-auto\n * @framerIntrinsicWidth 1440\n * @framerIntrinsicHeight 800\n */export default function KnobletFAQ(props){const{label=\"FAQ\",title=\"Common questions\",note=\"Your wallet is asking, we know\",showTabs=false,cta=\"See every answer\",ctaLink=\"/faq\"}=props;const preset=props.preset||\"home\";const items=props.items&&props.items.length?props.items:PRESETS[preset]||DEFAULT_QA;const tint=toHex(props.tint,K.sky);useKit();const cats=Array.from(new Set(items.map(i=>i.cat).filter(Boolean)));const[cat,setCat]=useState(cats[0]||\"\");const[open,setOpen]=useState(0);const root=useRef(null);const[compact,setCompact]=useState(false);useEffect(()=>{const el=root.current;if(!el)return;const ro=new ResizeObserver(()=>setCompact(el.clientWidth<760));ro.observe(el);return()=>ro.disconnect();},[]);const list=showTabs&&cat?items.filter(i=>i.cat===cat):items;return /*#__PURE__*/_jsxs(\"section\",{ref:root,style:{...props.style,width:\"100%\",padding:compact?\"56px 20px\":\"88px 40px\",boxSizing:\"border-box\",fontFamily:FONT.sans,color:K.ink,position:\"relative\"},\"aria-label\":title,children:[/*#__PURE__*/_jsxs(\"div\",{style:{maxWidth:820,margin:\"0 auto\"},children:[/*#__PURE__*/_jsxs(\"div\",{className:\"kn-rise\",style:{textAlign:\"center\"},children:[/*#__PURE__*/_jsx(Label,{bg:tint,children:label}),/*#__PURE__*/_jsx(\"h2\",{style:{...displayStyle(compact?\"44px\":\"clamp(56px, 5.8vw, 88px)\"),marginTop:16},children:title}),note&&/*#__PURE__*/_jsx(\"div\",{style:{...handStyle,color:K.forest,marginTop:8,transform:\"rotate(-2deg)\"},children:note})]}),showTabs&&cats.length>1&&/*#__PURE__*/_jsx(\"div\",{role:\"tablist\",style:{display:\"flex\",flexWrap:\"wrap\",justifyContent:\"center\",gap:8,marginTop:28},children:cats.map(c=>/*#__PURE__*/_jsx(\"button\",{role:\"tab\",\"aria-selected\":cat===c,className:\"kn-chip\",onClick:()=>{setCat(c);setOpen(0);},style:{background:cat===c?K.forest:\"rgba(14,58,43,0.07)\",color:cat===c?K.lime:K.ink},children:c},c))}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"grid\",gap:10,marginTop:34},children:list.map((it,i)=>{const on=open===i;return /*#__PURE__*/_jsxs(\"div\",{className:\"kf-row\",\"data-on\":on?\"1\":\"0\",style:{borderRadius:20,background:on?tint:\"rgba(14,58,43,0.05)\",transition:\"background .3s cubic-bezier(.32,.72,0,1)\"},children:[/*#__PURE__*/_jsxs(\"button\",{type:\"button\",\"aria-expanded\":on,onClick:()=>setOpen(on?-1:i),style:{all:\"unset\",boxSizing:\"border-box\",width:\"100%\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:16,padding:compact?\"18px 18px\":\"22px 26px\",fontWeight:600,fontSize:compact?16:18},children:[/*#__PURE__*/_jsx(\"span\",{children:it.q}),/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",className:\"kf-plus\",style:{flex:\"none\",width:32,height:32,borderRadius:16,background:on?K.forest:\"#fff\",color:on?K.lime:K.forest,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:20,fontWeight:500},children:\"+\"})]}),/*#__PURE__*/_jsx(\"div\",{className:\"kf-body\",style:{display:\"grid\",gridTemplateRows:on?\"1fr\":\"0fr\",transition:\"grid-template-rows .45s cubic-bezier(.32,.72,0,1)\"},children:/*#__PURE__*/_jsx(\"div\",{style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,padding:compact?\"0 18px 20px\":\"0 26px 24px\",maxWidth:640,fontSize:16,lineHeight:1.55,fontWeight:500},children:it.a})})})]},it.q);})}),cta&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",justifyContent:\"center\",marginTop:30},children:/*#__PURE__*/_jsx(Button,{label:cta,href:ctaLink})})]}),/*#__PURE__*/_jsx(\"style\",{children:`\n                .kf-plus{transition:transform .45s cubic-bezier(.34,1.56,.64,1), background .3s, color .3s}\n                .kf-row[data-on=\"1\"] .kf-plus{transform:rotate(135deg)}\n                .kf-row:hover{background:${tint}!important}\n                .kf-row button:focus-visible{outline:2px solid ${K.tangerine};outline-offset:-2px;border-radius:20px}\n                @media (prefers-reduced-motion: reduce){.kf-body,.kf-plus{transition:none!important}}\n            `})]});}const DEFAULT_QA=[{cat:\"Membership\",q:\"How much does it cost?\",a:\"One 1,000-piece puzzle is \\xa326 a month with free shipping. A second puzzle is 25% off, and paying every 3 or 12 months saves 10% or 18%.\"},{cat:\"Membership\",q:\"Can I skip a month or pause?\",a:\"Yes. Skip any month or pause for up to six months from your account, any time before the 25th. No emails, no phone calls, no guilt.\"},{cat:\"Shipping\",q:\"Where do you ship, and when does it arrive?\",a:\"We ship free to the US, UK and EU. Boxes leave Leeds on the 1st and most arrive by the 5th. You'll get a tracking link the moment it moves.\"},{cat:\"Puzzles\",q:\"What if a piece is missing?\",a:\"It almost never happens, because we weigh every box. If it does, send us a photo of the gap and we'll cut and post the exact piece, free.\"},{cat:\"Puzzles\",q:\"Are the puzzles hard?\",a:\"Each puzzle has a difficulty rating from 1 to 5. Most 500-piece puzzles take an evening or two, and most 1,000-piece ones take a weekend.\"}];const ALL=[...DEFAULT_QA,{cat:\"Membership\",q:\"How do I cancel?\",a:\"From your account, in two taps, any time before the 25th. Your last box still ships on the 1st and there is no cancellation fee.\"},{cat:\"Membership\",q:\"Can I choose my own puzzles?\",a:\"Yes. On the 1st you'll see the six new puzzles. Pick one or two before the 25th, or let us choose based on the ones you've loved.\"},{cat:\"Shipping\",q:\"Will it fit through my letterbox?\",a:\"The 1,000-piece box is 30 \\xd7 22 \\xd7 5 cm, which fits through most UK letterboxes. Two-puzzle boxes need a signature-free doorstep.\"},{cat:\"Shipping\",q:\"Do you ship outside the US, UK and EU?\",a:\"Not yet. We're adding Canada and Australia in spring 2027. Join the newsletter and you'll hear first.\"},{cat:\"Puzzles\",q:\"What are the puzzles made of?\",a:\"2 mm blue-core board from a mill in Finland, printed with vegetable inks and cut on our own dies in Leeds. The box is recycled card with no plastic.\"},{cat:\"Gifting\",q:\"Can I send a gift to arrive on a set date?\",a:\"Yes. E-gift cards go out on the date you choose, and printed cards post three days before it.\"},{cat:\"Gifting\",q:\"What if they already have a membership?\",a:\"The gift turns into credit on their account and pays for their next boxes automatically.\"}];const PRESETS={home:DEFAULT_QA,all:ALL,plans:ALL.filter(q=>q.cat===\"Membership\"||q.cat===\"Shipping\"),gifting:[...ALL.filter(q=>q.cat===\"Gifting\"),{cat:\"Gifting\",q:\"Can they swap sizes?\",a:\"Yes. Whoever receives the gift can switch between 500 and 1,000 pieces, or skip a month, from their own account.\"},{cat:\"Gifting\",q:\"Is the price shown the full price?\",a:\"Yes. The gift price includes every box and tracked shipping to the US, UK and EU. Nothing renews unless they choose to carry on.\"},{cat:\"Gifting\",q:\"Can I buy gifts for a whole team?\",a:\"Yes. Email gifts@knoblet.example with a list of names and we'll send each person their own card, with one invoice for you.\"}]};addPropertyControls(KnobletFAQ,{label:{type:ControlType.String,defaultValue:\"FAQ\"},title:{type:ControlType.String,defaultValue:\"Common questions\"},note:{type:ControlType.String,title:\"Hand note\",defaultValue:\"Your wallet is asking, we know\"},showTabs:{type:ControlType.Boolean,title:\"Category tabs\",defaultValue:false},preset:{type:ControlType.Enum,title:\"Questions\",options:[\"home\",\"all\",\"plans\",\"gifting\"],optionTitles:[\"Home (5)\",\"All (12)\",\"Plans\",\"Gifting\"],defaultValue:\"home\"},items:{type:ControlType.Array,title:\"Custom items\",description:\"Leave empty to use the preset questions\",control:{type:ControlType.Object,controls:{q:{type:ControlType.String,title:\"Question\"},a:{type:ControlType.String,title:\"Answer\",displayTextArea:true},cat:{type:ControlType.String,title:\"Category\"}}},defaultValue:[]},cta:{type:ControlType.String,title:\"Button\",defaultValue:\"See every answer\"},ctaLink:{type:ControlType.Link,title:\"Link\",defaultValue:\"/faq\"},tint:{type:ControlType.Color,defaultValue:K.sky}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"KnobletFAQ\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"800\",\"framerIntrinsicWidth\":\"1440\",\"framerSupportedLayoutHeight\":\"any-prefer-auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./KnobletFAQ.map"],"mappings":"gSAKG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,QAAM,MAAM,QAAM,mBAAmB,OAAK,iCAAiC,WAAS,GAAM,MAAI,mBAAmB,UAAQ,QAAQ,EAAY,EAAO,EAAM,QAAQ,OAAa,EAAM,EAAM,OAAO,EAAM,MAAM,OAAO,EAAM,MAAM,EAAQ,IAAS,EAAiB,EAAK,EAAM,EAAM,KAAK,EAAE,GAAG,EAAE,EAAO,EAAE,IAAM,EAAK,MAAM,KAAK,IAAI,IAAI,EAAM,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,EAAO,CAAC,EAAI,GAAQA,EAAS,EAAK,IAAI,EAAE,EAAO,CAAC,EAAK,GAASA,EAAS,CAAC,EAAQ,EAAKC,EAAO,IAAI,EAAO,CAAC,EAAQ,GAAYD,EAAS,EAAK,EAAE,MAAc,CAAC,IAAM,EAAG,EAAK,QAAQ,GAAG,CAAC,EAAG,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