{"version":3,"file":"FAQRow.BEiEOzlc.mjs","names":["useState","useRef","__esmMin","_e","p","c","init_jsx_runtime","ce","init_npm_react_18_3_1","de","addPropertyControls","init_framer_DcxuU94H","ControlType","FAQRow","props","open","setOpen","defaultOpen","id","singleOpen","onOther","EVT","toggle","next","bar","INK","EASE","HAIRLINE","style","question","MUTED","answer","init_FAQRow"],"sources":["https:/framerusercontent.com/modules/DlIftJ8jEtAVFFak84AQ/X1OOWWtPeQUxqMzTEmzU/FAQRow.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,useRef}from\"react\";/**\n * SBW FAQ row — one accordion item.\n *\n * Replaces the static mockup, which had no interactivity: row 1 carried an answer\n * and a \"−\", the other five had no answer element at all and a \"+\".\n *\n * Geometry matches the original exactly: 28px vertical padding, 26px question line,\n * 14px gap to the answer, 900px answer measure, 1px hairline on the bottom edge.\n *\n * Height is animated with the grid-template-rows 0fr→1fr technique rather than by\n * measuring the content, so it stays smooth at any answer length with no JS layout reads.\n *\n * Single-open coordination works across separate instances via a document-level event,\n * since each row is its own component instance with its own state.\n */const INK=\"var(--token-42f94d86-7a91-4040-9dd7-a7c743f4d935)\";const MUTED=\"var(--token-93f7ff27-53e9-4cca-8fda-1340f1b0a94c)\";const HAIRLINE=\"var(--token-8384b1e1-de3d-4ba8-bbf9-d5ed2007ff8f)\";const EVT=\"sbw-faq-open\";const EASE=\"cubic-bezier(0.2, 0, 0, 1)\";export default function FAQRow(props){const{question,answer,defaultOpen,singleOpen,style}=props;const[open,setOpen]=useState(!!defaultOpen);const id=useRef(Math.random().toString(36).slice(2));useEffect(()=>{if(!singleOpen)return;const onOther=e=>{if(e.detail!==id.current)setOpen(false);};document.addEventListener(EVT,onOther);return()=>document.removeEventListener(EVT,onOther);},[singleOpen]);function toggle(){const next=!open;setOpen(next);if(next&&singleOpen){document.dispatchEvent(new CustomEvent(EVT,{detail:id.current}));}}const bar={position:\"absolute\",background:INK,transition:`transform 0.3s ${EASE}`};return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",padding:\"28px 0\",borderBottom:`1px solid ${HAIRLINE}`,cursor:\"pointer\",boxSizing:\"border-box\",...style},onClick:toggle,onKeyDown:e=>{if(e.key===\"Enter\"||e.key===\" \"){e.preventDefault();toggle();}},role:\"button\",tabIndex:0,\"aria-expanded\":open,children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"flex-start\",gap:24},children:[/*#__PURE__*/_jsx(\"div\",{style:{flex:1,fontFamily:'\"Space Grotesk\", sans-serif',fontWeight:500,fontSize:24,lineHeight:\"108%\",letterSpacing:\"-0.035em\",color:INK},children:question}),/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:12,height:12,marginTop:7,flex:\"0 0 12px\"},\"aria-hidden\":true,children:[/*#__PURE__*/_jsx(\"div\",{style:{...bar,width:12,height:1.5,top:5.25,left:0}}),/*#__PURE__*/_jsx(\"div\",{style:{...bar,width:1.5,height:12,left:5.25,top:0,transform:open?\"rotate(90deg) scaleX(0)\":\"none\"}})]})]}),/*#__PURE__*/_jsx(\"div\",{style:{display:\"grid\",gridTemplateRows:open?\"1fr\":\"0fr\",opacity:open?1:0,transition:`grid-template-rows 0.34s ${EASE}, opacity 0.26s ${EASE}`},children:/*#__PURE__*/_jsx(\"div\",{style:{overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{paddingTop:14,maxWidth:900,fontFamily:'\"Public Sans\", sans-serif',fontWeight:400,fontSize:16,lineHeight:\"150%\",color:MUTED},children:answer})})})]});}FAQRow.defaultProps={question:\"Question\",answer:\"Answer\",defaultOpen:false,singleOpen:true};addPropertyControls(FAQRow,{question:{type:ControlType.String,title:\"Question\"},answer:{type:ControlType.String,title:\"Answer\",displayTextArea:true},defaultOpen:{type:ControlType.Boolean,title:\"Open by default\",defaultValue:false},singleOpen:{type:ControlType.Boolean,title:\"Close others\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FAQRow\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FAQRow.map"],"mappings":"A,+LAcqQ,SAAwBa,EAAO,EAAM,CAAC,GAAK,CAAC,WAAS,SAAO,cAAY,aAAW,SAAOC,EAAW,CAACC,EAAKC,GAAShB,EAAS,CAAC,CAACiB,CAAW,EAAQC,EAAGjB,EAAO,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAEM,MAAc,CAAC,GAAG,CAACY,EAAW,OAAO,IAAMC,EAAQ,GAAG,CAAI,EAAE,SAASF,EAAG,SAAQF,EAAQ,EAAK,CAAE,EAAyC,OAAvC,SAAS,iBAAiBK,EAAID,CAAO,MAAY,SAAS,oBAAoBC,EAAID,CAAO,CAAE,EAAE,CAACD,CAAU,CAAC,EAAE,SAASG,GAAQ,CAAC,IAAMC,EAAK,CAACR,EAAKC,EAAQO,CAAI,EAAKA,GAAMJ,GAAY,SAAS,cAAc,IAAI,YAAYE,EAAI,CAAC,OAAOH,EAAG,OAAO,CAAC,CAAC,CAAG,CAAC,IAAMM,EAAI,CAAC,SAAS,WAAW,WAAWC,EAAI,WAAW,kBAAkBC,GAAM,EAAE,MAAoB,gBAAM,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,QAAQ,SAAS,aAAa,aAAaC,IAAW,OAAO,UAAU,UAAU,aAAa,GAAGC,CAAK,EAAE,QAAQN,EAAO,UAAU,GAAG,EAAI,EAAE,MAAM,SAAS,EAAE,MAAM,OAAK,EAAE,eAAe,EAAEA,EAAO,EAAG,EAAE,KAAK,SAAS,SAAS,EAAE,gBAAgBP,EAAK,SAAS,CAAc,gBAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,WAAW,aAAa,IAAI,EAAE,EAAE,SAAS,CA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