{"version":3,"file":"SolutionFilters.CSSstZ2t.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","_e","p","ce","init_framer_DKtAEkcX","addPropertyControls","ControlType","useIsStaticRenderer","store","w","s","t","l","SolutionFilters","props","isStatic","type","setType","counts","setCounts","DEFAULT_COUNTS","narrow","setNarrow","q","hit","TYPES","kebab","raf","sync","c","types","onR","pick","u","visible","style","align","SANS","on","INK","init_SolutionFilters","init_jsx_runtime","\"All\"","\"SEO\"","\"Influencer\"","\"Ecommerce\"","\"Events\"","\"Consultancy\"","\"Recruitment\""],"sources":["https:/framerusercontent.com/modules/mWwbjBPstHcLSbQ3XLr4/GTyxuDiy965vNzQhsHd5/SolutionFilters.js"],"sourcesContent":["// Agency-type pills for the Solutions gallery. Talks to every SolutionCard\n// through window.__solutionsStore (see SolutionCard.tsx): sets the selected\n// type, and counts the registered cards so the numbers follow the CMS.\n// ?type=seo (or any label, kebab-case) preselects a pill. Owner: solutions-page.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";const SANS=`\"Inter\", \"Inter Placeholder\", ui-sans-serif, system-ui, -apple-system, sans-serif`;const INK=\"#252731\";const TYPES=[\"All\",\"Full Service\",\"SEO\",\"Influencer\",\"Lead Generation\",\"Paid Social\",\"Social and Content\",\"PR and Comms\",\"Web Studios\",\"Ecommerce\",\"Email Marketing\",\"Video Production\",\"Events\",\"Brand and Design\",\"Consultancy\",\"Recruitment\"];// counts at build time (19 Nov 2026); replaced by live counts once cards register\nconst DEFAULT_COUNTS={\"All\":133,\"Full Service\":36,\"SEO\":28,\"Influencer\":32,\"Lead Generation\":29,\"Paid Social\":39,\"Social and Content\":42,\"PR and Comms\":25,\"Web Studios\":26,\"Ecommerce\":36,\"Email Marketing\":18,\"Video Production\":29,\"Events\":26,\"Brand and Design\":31,\"Consultancy\":25,\"Recruitment\":10};const kebab=s=>s.toLowerCase().replace(/[^a-z0-9]+/g,\"-\");function store(){const w=globalThis;if(!w.__solutionsStore){const s={type:\"All\",cards:new Map,listeners:new Set,open:null,setType(t){s.type=t;s.emit();},emit(){s.listeners.forEach(l=>l());}};w.__solutionsStore=s;}return w.__solutionsStore;}/**\n * Solution filters\n *\n * @framerIntrinsicWidth 1100\n * @framerIntrinsicHeight 120\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export default function SolutionFilters(props){const{align=\"center\",showCount=true,style}=props;const isStatic=useIsStaticRenderer();const[type,setType]=useState(\"All\");const[counts,setCounts]=useState(DEFAULT_COUNTS);const[narrow,setNarrow]=useState(false);useEffect(()=>{if(isStatic)return;const s=store();const q=new URLSearchParams(window.location.search).get(\"type\");if(q){const hit=TYPES.find(t=>kebab(t)===kebab(q));if(hit)s.setType(hit);}let raf=0;const sync=()=>{setType(s.type);cancelAnimationFrame(raf);raf=requestAnimationFrame(()=>{if(s.cards.size<1)return;const c={};for(const t of TYPES)c[t]=0;s.cards.forEach(types=>{for(const t of TYPES)if(t===\"All\"||types.includes(t)||types.includes(\"All\"))c[t]++;});setCounts(c);});};sync();s.listeners.add(sync);const onR=()=>setNarrow(window.innerWidth<810);onR();window.addEventListener(\"resize\",onR);return()=>{s.listeners.delete(sync);window.removeEventListener(\"resize\",onR);cancelAnimationFrame(raf);};},[isStatic]);const pick=t=>{store().setType(t);try{const u=new URL(window.location.href);if(t===\"All\")u.searchParams.delete(\"type\");else u.searchParams.set(\"type\",kebab(t));window.history.replaceState(window.history.state,\"\",u.pathname+u.search);}catch{}};const visible=TYPES.filter(t=>t===\"All\"||(counts[t]??0)>0);const n=counts[type]??0;return /*#__PURE__*/_jsx(\"div\",{style:{...style,width:\"100%\",display:\"flex\",flexDirection:\"column\",alignItems:align===\"center\"?\"center\":\"flex-start\",gap:16,fontFamily:SANS},children:/*#__PURE__*/_jsx(\"div\",{role:\"tablist\",\"aria-label\":\"Agency type\",style:{display:\"flex\",gap:8,width:\"100%\",justifyContent:narrow?\"flex-start\":align===\"center\"?\"center\":\"flex-start\",flexWrap:narrow?\"nowrap\":\"wrap\",overflowX:narrow?\"auto\":\"visible\",scrollbarWidth:\"none\",WebkitOverflowScrolling:\"touch\",padding:narrow?\"2px 20px\":0,margin:narrow?\"0 -20px\":0,boxSizing:narrow?\"content-box\":\"border-box\"},children:visible.map(t=>{const on=t===type;return /*#__PURE__*/_jsxs(\"button\",{role:\"tab\",\"aria-selected\":on,onClick:()=>pick(t),onMouseEnter:e=>!on&&(e.currentTarget.style.borderColor=\"#C6CDD6\"),onMouseLeave:e=>!on&&(e.currentTarget.style.borderColor=\"#DEE3E8\"),style:{display:\"inline-flex\",alignItems:\"center\",gap:6,padding:\"6px 12px\",borderRadius:999,border:`1px solid ${on?INK:\"#DEE3E8\"}`,background:on?INK:\"#FFFFFF\",color:on?\"#FFFFFF\":INK,font:`500 13px/18px ${SANS}`,whiteSpace:\"nowrap\",cursor:\"pointer\",flexShrink:0,transition:\"background 150ms ease, color 150ms ease, border-color 150ms ease\"},children:[t,/*#__PURE__*/_jsx(\"span\",{style:{color:on?\"rgba(255,255,255,0.65)\":\"#888A93\",fontVariantNumeric:\"tabular-nums\"},children:counts[t]??\"\"})]},t);})})});}addPropertyControls(SolutionFilters,{align:{type:ControlType.Enum,options:[\"center\",\"left\"],defaultValue:\"center\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SolutionFilters\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"120\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"1100\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SolutionFilters.map"],"mappings":"A,oMAKqW,SAASY,GAAO,CAAC,IAAMC,EAAE,WAAW,GAAG,CAACA,EAAE,iBAAiB,CAAC,IAAMC,EA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