{"version":3,"file":"Overrides.C0w_yDTO.mjs","names":["React.useRef","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/0ij1cHhDRC1YG05X52eT/VSxd7zLW89GTf623m9RO/Overrides.js"],"sourcesContent":["// overrides.tsx\nimport{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";/**\n * Alternates a row's direction on desktop only.\n * - firstImageLeft: true  => item 1 = image left (row-reverse), item 2 = row, ...\n *                      false => item 1 = image right (row), item 2 = row-reverse, ...\n */function useAlternateRow(ref,gap=16,bp=900,firstImageLeft=true){React.useLayoutEffect(()=>{const el=ref.current;if(!el)return;const itemRoot=el.closest(\"a\")??el;const parent=itemRoot.parentElement;if(!parent)return;const siblings=Array.from(parent.children);const index=siblings.indexOf(itemRoot)// 0-based\n;const mq=window.matchMedia(`(max-width: ${bp}px)`);const applyDesktop=()=>{// row container styling\nel.style.display=\"flex\";el.style.gap=`${gap}px`;// decide direction based on index and desired start side\nconst even=index%2===0;const dir=firstImageLeft?even?\"row-reverse\":\"row\":even?\"row\":\"row-reverse\";el.style.flexDirection=dir;// clear any mobile ordering; keep flexible columns\nArray.from(el.children).forEach(c=>{const child=c;child.style.removeProperty(\"order\");child.style.flex=\"1 1 0\";child.style.minWidth=\"0\";});};const applyMobile=()=>{// remove everything we added so canvas breakpoints control mobile/tablet\nel.style.removeProperty(\"display\");el.style.removeProperty(\"gap\");el.style.removeProperty(\"flex-direction\");Array.from(el.children).forEach(c=>{const child=c;child.style.removeProperty(\"order\");child.style.removeProperty(\"flex\");child.style.removeProperty(\"min-width\");});};const update=()=>{if(mq.matches)applyMobile();else applyDesktop();};update();mq.addEventListener?.(\"change\",update);return()=>{mq.removeEventListener?.(\"change\",update);applyMobile();};});}/** Commercial services row (unchanged) */export function AlternateCommercialRow(){const ref=React.useRef(null);useAlternateRow(ref,16,900,true)// first card image-left\n;return{ref};}/** Domestic services row (unchanged) */export function AlternateDomesticRow(){const ref=React.useRef(null);useAlternateRow(ref,16,900,true);return{ref};}/** Case studies row — attach to the row inside each \"Project Item\" */export function AlternateCaseStudyRow(){const ref=React.useRef(null);// tweak gap/bp/start side here if you need different behavior for case studies:\nuseAlternateRow(ref,16,900,true)// true = first case study image-left\n;return{ref};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withAlternateCommercialRow(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...AlternateCommercialRow(props)});};}withAlternateCommercialRow.displayName=\"AlternateCommercialRow\";export function withAlternateDomesticRow(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...AlternateDomesticRow(props)});};}withAlternateDomesticRow.displayName=\"AlternateDomesticRow\";export function withAlternateCaseStudyRow(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...AlternateCaseStudyRow(props)});};}withAlternateCaseStudyRow.displayName=\"AlternateCaseStudyRow\";\nexport const __FramerMetadata__ = {\"exports\":{\"withAlternateDomesticRow\":{\"type\":\"reactHoc\",\"name\":\"withAlternateDomesticRow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"AlternateDomesticRow\":{\"type\":\"override\",\"name\":\"AlternateDomesticRow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"AlternateCaseStudyRow\":{\"type\":\"override\",\"name\":\"AlternateCaseStudyRow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"AlternateCommercialRow\":{\"type\":\"override\",\"name\":\"AlternateCommercialRow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAlternateCommercialRow\":{\"type\":\"reactHoc\",\"name\":\"withAlternateCommercialRow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAlternateCaseStudyRow\":{\"type\":\"reactHoc\",\"name\":\"withAlternateCaseStudyRow\",\"annotations\":{\"framerContractVersion\":\"1\"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