{"version":3,"file":"useCmsFeaturedArticleSlot.DHKCfKCE.mjs","names":[],"sources":["https:/framerusercontent.com/modules/I2aetWBGnJ2PtHqP9vUx/gBqJ4oOz7j2nUTVYhJnw/sectionHeaderCopy.js","https:/framerusercontent.com/modules/cyGmgQReYxM74CJs0WW6/IaBl4aRmvHjipJBg6Oy5/useCmsFeaturedArticleSlot.js"],"sourcesContent":["/**\n * Standard centered section header copy (headline + subheadline).\n *\n * Use for in-page `Section*` organisms: marketing blocks, feature rows, FAQs, grids, etc.\n * Do **not** use for page mastheads (`SectionHeader*`, hero overlays, blog post headers);\n * those use {@link SECTION_PAGE_HEADER_HEADLINE_PATH} (3XL + LG) or bespoke hero tokens.\n */import Tokens from\"https://framerusercontent.com/modules/HjvhO8Re4WnlZSTpJli8/jbCIdsxnmVrJOsDqxSxp/index.js\";import{getCopyStackGap}from\"https://framerusercontent.com/modules/mehW3ipt7NwJNkWUjO0g/TatoE2nXREsJFApGHAt7/layoutStyles.js\";import{SECTION_STANDARD_HEADLINE_PATH,getHeadlineTypographyStyles,getSupportingTextTypographyStyles}from\"https://framerusercontent.com/modules/RmN61z15fCdVprMnjOlR/v3xJUX5hd8e0iGkuHZYh/sectionCopyTypography.js\";export{SECTION_STANDARD_HEADLINE_PATH,SECTION_PAGE_HEADER_HEADLINE_PATH}from\"https://framerusercontent.com/modules/RmN61z15fCdVprMnjOlR/v3xJUX5hd8e0iGkuHZYh/sectionCopyTypography.js\";/**\n * Centered stack layout capped at width-xl (768px) for headline and subheadline.\n */export function getCenteredSectionHeaderStackLayout(breakpoint,options){return{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",textAlign:\"center\",gap:getCopyStackGap(breakpoint),width:\"100%\",maxWidth:Tokens.getWidthValue(\"width-xl\"),marginLeft:\"auto\",marginRight:\"auto\",...options?.marginBottom!==undefined?{marginBottom:options.marginBottom}:{}};}/** Standard section headline styles (2XL Heavy). */export function getStandardSectionHeadlineStyles(breakpoint){return{...getHeadlineTypographyStyles(SECTION_STANDARD_HEADLINE_PATH,breakpoint),margin:0,width:\"100%\",textAlign:\"center\"};}/** Standard section subheadline styles (MD), paired to 2XL per design system. */export function getStandardSectionSubheadlineStyles(breakpoint){return{...getSupportingTextTypographyStyles(SECTION_STANDARD_HEADLINE_PATH,breakpoint),margin:0,width:\"100%\",textAlign:\"center\"};}\nexport const __FramerMetadata__ = {\"exports\":{\"SECTION_PAGE_HEADER_HEADLINE_PATH\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SECTION_STANDARD_HEADLINE_PATH\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getStandardSectionHeadlineStyles\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getCenteredSectionHeaderStackLayout\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getStandardSectionSubheadlineStyles\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{useLayoutEffect}from\"react\";import{SECTION_BREAKPOINT_ATTR}from\"https://framerusercontent.com/modules/UbgdYJbCrYBlOiBwtGI6/q8E4QzoWXW9nmCeNLkKT/useInheritedSectionBreakpoint.js\";export const CMS_CARD_ROOT_ATTR=\"data-bunq-cms-card-root\";const PASS_THROUGH_STYLES={display:\"contents\",boxSizing:\"border-box\"};function applyInlineStyles(element,styles){Object.entries(styles).forEach(([property,value])=>{if(value==null)return;element.style[property]=String(value);});}function getCollectionRoots(host){return Array.from(host.children).flatMap(child=>{if(!(child instanceof HTMLElement))return[];if(child.style.display===\"contents\"&&child.childElementCount>0){return Array.from(child.children).filter(nested=>nested instanceof HTMLElement);}return[child];});}function findCmsCardRoot(host){return host.querySelector(`[${CMS_CARD_ROOT_ATTR}]`);}/** Remove Framer collection list / item frames so only the code component card renders. */function flattenFramerWrappersToCard(host){const cardRoot=findCmsCardRoot(host);if(!cardRoot)return;let wrapper=cardRoot.parentElement;while(wrapper&&wrapper!==host){applyInlineStyles(wrapper,{display:\"contents\",background:\"transparent\",backgroundColor:\"transparent\",border:\"none\",borderRadius:0,boxShadow:\"none\",padding:0,margin:0,overflow:\"visible\",width:\"auto\",maxWidth:\"none\",minWidth:0,boxSizing:\"border-box\"});wrapper=wrapper.parentElement;}}function applyPassThroughLayout(host,breakpoint){if(host.getAttribute(SECTION_BREAKPOINT_ATTR)!==breakpoint){host.setAttribute(SECTION_BREAKPOINT_ATTR,breakpoint);}getCollectionRoots(host).forEach(root=>{applyInlineStyles(root,PASS_THROUGH_STYLES);Array.from(root.children).forEach(child=>{if(child instanceof HTMLElement){applyInlineStyles(child,PASS_THROUGH_STYLES);}});});flattenFramerWrappersToCard(host);}/**\n * Pass-through CMS slot for a single featured article: no list chrome, only the\n * collection item card (marked with {@link CMS_CARD_ROOT_ATTR}).\n * @syncRevision 20260519-3\n */export function useCmsFeaturedArticleSlot(hostRef,enabled,breakpoint){useLayoutEffect(()=>{if(!enabled)return undefined;const host=hostRef.current;if(!host)return undefined;let isApplying=false;const apply=()=>{if(isApplying)return;isApplying=true;try{applyPassThroughLayout(host,breakpoint);}finally{isApplying=false;}};apply();if(typeof MutationObserver===\"undefined\"){return()=>host.removeAttribute(SECTION_BREAKPOINT_ATTR);}const observer=new MutationObserver(apply);// childList only — observing attributes retriggers on inline style mutations.\nobserver.observe(host,{childList:true,subtree:true});return()=>{observer.disconnect();host.removeAttribute(SECTION_BREAKPOINT_ATTR);};},[hostRef,enabled,breakpoint]);}\nexport const __FramerMetadata__ = {\"exports\":{\"useCmsFeaturedArticleSlot\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CMS_CARD_ROOT_ATTR\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"8QAQG,SAAgB,EAAoC,EAAW,EAAQ,CAAC,MAAM,CAAC,QAAQ,OAAO,cAAc,SAAS,WAAW,SAAS,UAAU,SAAS,IAAI,EAAgB,CAAU,EAAE,MAAM,OAAO,SAAS,EAAO,cAAc,UAAU,EAAE,WAAW,OAAO,YAAY,OAAO,GAAG,GAAS,eAAe,IAAA,GAA8C,CAAC,EAArC,CAAC,aAAa,EAAQ,YAAY,CAAI,CAAE,CAAqD,SAAgB,EAAiC,EAAW,CAAC,MAAM,CAAC,GAAG,EAA4B,EAA+B,CAAU,EAAE,OAAO,EAAE,MAAM,OAAO,UAAU,QAAQ,CAAE,CAAkF,SAAgB,EAAoC,EAAW,CAAC,MAAM,CAAC,GAAG,EAAkC,EAA+B,CAAU,EAAE,OAAO,EAAE,MAAM,OAAO,UAAU,QAAQ,CAAE,iBAFzvB,IAA6H,IAAmN,mBCN7Z,IAAsJ,EAAc,EAAmB"}