{"version":3,"file":"ComparisonTable.O2EnJH1v.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/wMSZyuQ7thfaxLtAvD2M/RMwvCgugrEsbbznGc1EL/ComparisonTable.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect}from\"react\";/**\n * SEO-Optimized Comparison Table\n * - Renders semantic HTML table (thead/th/tbody) for Google\n * - Mobile responsive: stacks into cards on small screens\n * - Configurable via Framer property controls\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function ComparisonTable(props){const{columns=[],rows=[],highlightColumn=0,highlightColor=\"#E8FAFB\",highlightHeaderColor=\"#16C9E0\",headerBg=\"#1a1a2e\",headerText=\"#ffffff\",borderColor=\"#F3F3F3\",stripedBg=\"#f9f9fb\",fontSize=15,borderRadius=12,cellPadding=14,showCheckIcons=true,caption=\"\",mobileBreakpoint=640}=props;const[isMobile,setIsMobile]=useState(false);useEffect(()=>{const check=()=>setIsMobile(window.innerWidth<mobileBreakpoint);check();window.addEventListener(\"resize\",check);return()=>window.removeEventListener(\"resize\",check);},[mobileBreakpoint]);const parsedColumns=columns.length?columns.split(\"\\n\").map(s=>s.trim()).filter(Boolean):[\"Feature\",\"Voicy\",\"Competitor\"];const parsedRows=rows.length?rows.split(\"\\n\").map(s=>s.trim()).filter(Boolean).map(row=>row.split(\"|\").map(cell=>cell.trim())):[[\"Accuracy\",\"99%+\",\"~90%\"],[\"Auto punctuation\",\"Yes\",\"No\"],[\"Works everywhere\",\"Yes\",\"No\"]];const renderCell=text=>{if(!showCheckIcons)return text;const lower=text.toLowerCase().trim();if(lower===\"yes\"||lower===\"✓\"||lower===\"true\"||lower===\"✅\")return /*#__PURE__*/_jsx(\"span\",{style:{color:\"#2E7D32\",fontWeight:600,fontSize:fontSize+2},children:\"✅\"});if(lower===\"no\"||lower===\"✗\"||lower===\"false\"||lower===\"❌\")return /*#__PURE__*/_jsx(\"span\",{style:{color:\"#c62828\",fontWeight:600,fontSize:fontSize+2},children:\"❌\"});return text;};// --- MOBILE: Card layout ---\nif(isMobile){return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",fontFamily:\"Inter, system-ui, sans-serif\"},children:[caption&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:fontSize-4,color:\"#666\",textAlign:\"center\",marginBottom:12},children:caption}),parsedRows.map((row,ri)=>/*#__PURE__*/_jsxs(\"div\",{style:{border:`1px solid ${borderColor}`,borderRadius,marginBottom:12,overflow:\"hidden\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{background:headerBg,color:headerText,padding:`${cellPadding}px ${cellPadding+2}px`,fontWeight:700,fontSize:fontSize+1},children:row[0]||\"—\"}),parsedColumns.slice(1).map((col,ci)=>{const colIndex=ci+1;const isHighlight=colIndex===highlightColumn;return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",justifyContent:\"space-between\",alignItems:\"center\",padding:`${cellPadding-2}px ${cellPadding+2}px`,background:isHighlight?highlightColor:ci%2===0?\"#fff\":stripedBg,borderTop:`1px solid ${borderColor}`,fontSize},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:\"#555\",fontWeight:500},children:col}),/*#__PURE__*/_jsx(\"span\",{style:{fontWeight:isHighlight?700:400,color:isHighlight?highlightHeaderColor:\"#333\"},children:renderCell(row[colIndex]||\"—\")})]},ci);})]},ri))]});}// --- DESKTOP: Semantic table ---\nreturn /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",overflowX:\"auto\",fontFamily:\"Inter, system-ui, sans-serif\"},children:/*#__PURE__*/_jsxs(\"table\",{role:\"table\",style:{width:\"100%\",borderCollapse:\"separate\",borderSpacing:0,border:`1px solid ${borderColor}`,borderRadius,overflow:\"hidden\",fontSize,lineHeight:1.5},children:[caption&&/*#__PURE__*/_jsx(\"caption\",{style:{captionSide:\"bottom\",fontSize:fontSize-2,color:\"#666\",padding:\"8px 0\",textAlign:\"left\"},children:caption}),/*#__PURE__*/_jsx(\"thead\",{children:/*#__PURE__*/_jsx(\"tr\",{children:parsedColumns.map((col,ci)=>{const isHighlight=ci===highlightColumn;return /*#__PURE__*/_jsxs(\"th\",{scope:\"col\",style:{background:isHighlight?highlightHeaderColor:headerBg,color:headerText,padding:`${cellPadding+2}px ${cellPadding+4}px`,textAlign:ci===0?\"left\":\"center\",fontWeight:700,fontSize:fontSize+1,borderBottom:`2px solid ${borderColor}`,whiteSpace:\"nowrap\",...isHighlight?{boxShadow:`inset 0 -3px 0 ${highlightHeaderColor}`}:{}},children:[col,isHighlight&&/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",fontSize:fontSize-3,fontWeight:400,opacity:.85,marginTop:2},children:\"⭐ Recommended\"})]},ci);})})}),/*#__PURE__*/_jsx(\"tbody\",{children:parsedRows.map((row,ri)=>/*#__PURE__*/_jsx(\"tr\",{children:parsedColumns.map((_,ci)=>{const isHighlight=ci===highlightColumn;const isFeatureCol=ci===0;return /*#__PURE__*/_jsx(\"td\",{style:{padding:`${cellPadding}px ${cellPadding+4}px`,textAlign:isFeatureCol?\"left\":\"center\",fontWeight:isFeatureCol?600:isHighlight?600:400,color:isFeatureCol?\"#1a1a2e\":isHighlight?highlightHeaderColor:\"#444\",background:isHighlight?highlightColor:ri%2===1?stripedBg:\"#fff\",borderBottom:ri<parsedRows.length-1?`1px solid ${borderColor}`:\"none\",...isHighlight?{borderLeft:`1px solid ${highlightColor}`,borderRight:`1px solid ${highlightColor}`}:{}},children:renderCell(row[ci]||\"—\")},ci);})},ri))})]})});}// --- Framer Property Controls ---\naddPropertyControls(ComparisonTable,{columns:{type:ControlType.String,title:\"Columns\",displayTextArea:true,defaultValue:\"Feature\\nVoicy\\nCompetitor\",description:\"One column name per line\"},rows:{type:ControlType.String,title:\"Rows\",displayTextArea:true,defaultValue:\"Accuracy|99%+|~90%\\nAuto punctuation|Yes|No\\nWorks in any app|Yes|No\\nBrowser extension|Yes|No\\nAI writing assistant|Yes|No\\nOffline mode|Yes|No\\nPrice|Free trial|Free\",description:\"One row per line. Cells separated by |\"},highlightColumn:{type:ControlType.Number,title:\"Highlight Col\",defaultValue:1,min:0,max:10,step:1,description:\"Column index to highlight (0 = first)\"},caption:{type:ControlType.String,title:\"Caption\",defaultValue:\"\",description:\"Optional table caption for SEO\"},showCheckIcons:{type:ControlType.Boolean,title:\"Check Icons\",defaultValue:true,description:\"Convert Yes/No to ✅/❌\"},highlightColor:{type:ControlType.Color,title:\"Highlight BG\",defaultValue:\"#E8FAFB\"},highlightHeaderColor:{type:ControlType.Color,title:\"Highlight Header\",defaultValue:\"#16C9E0\"},headerBg:{type:ControlType.Color,title:\"Header BG\",defaultValue:\"#1a1a2e\"},headerText:{type:ControlType.Color,title:\"Header Text\",defaultValue:\"#ffffff\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#F3F3F3\"},stripedBg:{type:ControlType.Color,title:\"Striped BG\",defaultValue:\"#f9f9fb\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:15,min:10,max:24,step:1},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:12,min:0,max:24,step:2},cellPadding:{type:ControlType.Number,title:\"Padding\",defaultValue:14,min:6,max:24,step:2},mobileBreakpoint:{type:ControlType.Number,title:\"Mobile BP\",defaultValue:640,min:320,max:1024,step:10,description:\"Width below which cards are shown\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ComparisonTable\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ComparisonTable.map"],"mappings":"sMAQG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,UAAQ,EAAE,CAAC,OAAK,EAAE,CAAC,kBAAgB,EAAE,iBAAe,UAAU,uBAAqB,UAAU,WAAS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