{"version":3,"file":"ProjectDataBridge.CEG53H-w.mjs","names":["__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","c","init_jsx_runtime","ce","addPropertyControls","init_framer_CaDWdxiz","ControlType","ProjectDataBridge","record","p","encoded","channel","send","init_ProjectDataBridge"],"sources":["https:/framerusercontent.com/modules/CWc2iBrE9N6881AMbZ5p/Tkp33wiKtPwYoqUe2a8U/ProjectDataBridge.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/** @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 1\n * @framerIntrinsicHeight 1 */export default function ProjectDataBridge(p){const record={id:p.recordId,url:p.route,slug:p.slug,title:p.title,summary:p.summary,disciplines:(p.disciplines||\"\").split(\" | \"),sectors:(p.sectors||\"\").split(\" | \"),image:p.image?.src||\"\",panorama:p.panorama?.src||\"\",fit:p.fit||\"contain\",focal:p.focal||\"50% 50%\",surface:p.surface||\"#f4f3ef\",hero:p.hero,order:p.order,heroOrder:p.heroOrder,ready:true};const encoded=JSON.stringify(record),channel=p.channel===\"clients\"?\"portfolio-client\":\"portfolio-cms\";React.useEffect(()=>{const send=()=>window.dispatchEvent(new CustomEvent(channel+\"-record\",{detail:JSON.parse(encoded)}));window.addEventListener(channel+\"-request\",send);send();return()=>{window.removeEventListener(channel+\"-request\",send);window.dispatchEvent(new CustomEvent(channel+\"-remove\",{detail:{slug:p.slug}}));};},[encoded,channel]);return /*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{display:\"none\"}});}addPropertyControls(ProjectDataBridge,{recordId:{type:ControlType.String,defaultValue:\"\"},route:{type:ControlType.Link},channel:{type:ControlType.Enum,options:[\"projects\",\"clients\"],defaultValue:\"projects\"},slug:{type:ControlType.String,defaultValue:\"\"},title:{type:ControlType.String,defaultValue:\"\"},summary:{type:ControlType.String,defaultValue:\"\"},disciplines:{type:ControlType.String,defaultValue:\"\"},sectors:{type:ControlType.String,defaultValue:\"\"},image:{type:ControlType.ResponsiveImage},fit:{type:ControlType.String,title:\"Fit\",defaultValue:\"contain\"},focal:{type:ControlType.String,title:\"Focal\",defaultValue:\"50% 50%\"},surface:{type:ControlType.Color,title:\"Surface\",defaultValue:\"#f4f3ef\"},panorama:{type:ControlType.ResponsiveImage,title:\"Panorama\"},hero:{type:ControlType.Boolean,defaultValue:false},order:{type:ControlType.Number,defaultValue:0},heroOrder:{type:ControlType.Number,defaultValue:0}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProjectDataBridge\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"\",\"framerIntrinsicWidth\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProjectDataBridge.map"],"mappings":"A,wLAG8B,SAAwBU,EAAkB,EAAE,CAAC,IAAMC,EAAO,CAAC,GAAGC,EAAE,SAAS,IAAIA,EAAE,MAAM,KAAKA,EAAE,KAAK,MAAMA,EAAE,MAAM,QAAQA,EAAE,QAAQ,aAAaA,EAAE,aAAa,GAAA,CAAI,MAAM,KAAK,EAAE,SAASA,EAAE,SAAS,GAAA,CAAI,MAAM,KAAK,EAAE,MAAMA,EAAE,OAAO,KAAK,GAAG,SAASA,EAAE,UAAU,KAAK,GAAG,IAAIA,EAAE,KAAK,UAAU,MAAMA,EAAE,OAAO,UAAU,QAAQA,EAAE,SAAS,UAAU,KAAKA,EAAE,KAAK,MAAMA,EAAE,MAAM,UAAUA,EAAE,UAAU,MAAM,EAAI,EAAQC,EAAQ,KAAK,UAAUF,CAAM,EAAEG,EAAQF,EAAE,UAAU,UAAU,mBAAmB,gBAAwW,OAAxVN,MAAoB,CAAC,IAAMS,MAASZ,EAAO,cAAc,IAAI,YAAYW,EAA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