{"version":3,"file":"RepairStatusLink.D03D_rQL.mjs","names":["React.useRef"],"sources":["https:/framerusercontent.com/modules/lsZzAeBSO0HowZiDfwny/iJ8HSOidUmEhDbq12b5V/RepairStatusLink.js"],"sourcesContent":["// RepairStatusLink.tsx — \"Repair Status\" menu link with a live effect (v1.004), for Framer.\n// Paste into a new Framer code file named RepairStatusLink.tsx.\n// Right panel lets you switch the effect any time: Pill fills (15), Words fill (13), Both, Pulse only, Still.\n// Set \"Font\" to the exact same font, size and weight as the FAQ / Location links. Only color + motion differ.\n// v1.003: uses Framer's own Link, so the page picker works in Preview and on the live site (v1.001/v1.002 gave \"404 page not found\").\n// v1.004: \"Fill menu to bottom\" - when this link sits in the phone/tablet menu, it stretches the menu's white panel\n//         to the very bottom of the screen, so iPhone Safari shows white (not a grey strip) under its floating toolbar.\n// It does not touch RepairStatus.tsx, Estimate_Form.tsx or the site head code.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,Link}from\"framer\";const CSS=`\n.rsl{display:inline-flex;align-items:center;gap:10px;text-decoration:none;cursor:pointer;white-space:nowrap;-webkit-tap-highlight-color:transparent}\n.rsl .dot{position:relative;width:18px;height:18px;flex:none;display:grid;place-items:center}\n.rsl .dot::before{content:\"\";width:9px;height:9px;border-radius:50%;background:var(--c);position:relative;z-index:2}\n.rsl .dot::after{content:\"\";position:absolute;inset:4px;border-radius:50%;background:var(--c);animation:rsl-ping 1.4s cubic-bezier(0,0,.2,1) infinite}\n@keyframes rsl-ping{0%{transform:scale(1);opacity:.6}80%,100%{transform:scale(2.6);opacity:0}}\n.rsl .t{position:relative;color:var(--c)}\n/* 15: light pill grows behind the words */\n.rsl.pill .t,.rsl.both .t{padding:0 10px;margin-right:-10px;border-radius:999px;isolation:isolate}\n.rsl.pill .t::before,.rsl.both .t::before{content:\"\";position:absolute;inset:0;border-radius:999px;background:var(--l);z-index:-1;transform-origin:left;animation:rsl-pf var(--s) ease-in-out infinite}\n@keyframes rsl-pf{0%{transform:scaleX(0)}70%{transform:scaleX(1)}92%{transform:scaleX(1);opacity:1}100%{transform:scaleX(1);opacity:0}}\n/* 13: words start light and fill solid left to right */\n.rsl.words .t,.rsl.both .t{color:var(--w)}\n.rsl.words .t::after,.rsl.both .t::after{content:attr(data-t);position:absolute;top:0;bottom:0;left:0;width:0;overflow:hidden;white-space:nowrap;color:var(--c);animation:rsl-fw var(--s) ease-in-out infinite}\n.rsl.both .t::after{left:10px}\n@keyframes rsl-fw{0%{width:0}70%{width:calc(100% - var(--p))}92%{width:calc(100% - var(--p));opacity:1}100%{width:calc(100% - var(--p));opacity:0}}\n@media (prefers-reduced-motion:reduce){.rsl *,.rsl *::before,.rsl *::after{animation:none!important}.rsl .t::after{width:auto!important}}\n`;/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function RepairStatusLink(props){const{text,link,effect,dot,align,color,lightColor,seconds,font,style,fillMenu}=props;const ref=React.useRef(null);/* v1.004: find the menu's white panel around this link and make it at least as tall as the whole screen\n       (100lvh = the screen height including the part under Safari's toolbar). Only touches a big white panel\n       inside a fixed (floating) layer - never the normal header - and puts everything back when the menu closes. */React.useEffect(()=>{if(!fillMenu||typeof window===\"undefined\")return;let panel=null,old=\"\";const white=el=>/^rgba?\\(255, 255, 255(, 1)?\\)$/.test(getComputedStyle(el).backgroundColor);const find=()=>{if(panel||!ref.current)return;const chain=[];let el=ref.current.parentElement,fixed=false;while(el&&el!==document.body){chain.push(el);if(getComputedStyle(el).position===\"fixed\"){fixed=true;break;}el=el.parentElement;}if(!fixed)return;let pick=null;for(const c of chain)if(white(c))pick=c;if(!pick||pick.getBoundingClientRect().height<window.innerHeight*.5)return;panel=pick;old=pick.style.minHeight;pick.style.minHeight=\"100lvh\";};find();const t1=setTimeout(find,150),t2=setTimeout(find,500);return()=>{clearTimeout(t1);clearTimeout(t2);if(panel)panel.style.minHeight=old;};},[fillMenu]);const vars={\"--c\":color,\"--l\":lightColor,\"--w\":\"#9CCFAF\",\"--s\":`${seconds}s`,\"--p\":effect===\"both\"?\"20px\":\"0px\"};return /*#__PURE__*/_jsxs(\"div\",{ref:ref,style:{...style,display:\"flex\",justifyContent:align===\"right\"?\"flex-end\":\"flex-start\"},children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),/*#__PURE__*/_jsx(Link,{href:link||\"/repair-status\",openInNewTab:false,children:/*#__PURE__*/_jsxs(\"a\",{className:`rsl ${effect}`,style:{fontFamily:\"inherit\",...vars,...font},children:[dot&&/*#__PURE__*/_jsx(\"span\",{className:\"dot\",\"aria-hidden\":\"true\"}),/*#__PURE__*/_jsx(\"span\",{className:\"t\",\"data-t\":text,children:text})]})})]});}RepairStatusLink.defaultProps={text:\"Repair Status\",link:\"/repair-status\",effect:\"pill\",dot:true,align:\"right\",color:\"#16A34A\",lightColor:\"#DCF3E5\",seconds:3,fillMenu:true,font:{fontSize:21,fontWeight:500,lineHeight:1.25}};addPropertyControls(RepairStatusLink,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Repair Status\"},link:{type:ControlType.Link,title:\"Link\",defaultValue:\"/repair-status\"},effect:{type:ControlType.Enum,title:\"Effect\",options:[\"pill\",\"words\",\"both\",\"pulse\",\"still\"],optionTitles:[\"Pill fills (15)\",\"Words fill (13)\",\"Both\",\"Pulse only\",\"Still\"],defaultValue:\"pill\"},dot:{type:ControlType.Boolean,title:\"Dot\",enabledTitle:\"On\",disabledTitle:\"Off\",defaultValue:true},align:{type:ControlType.Enum,title:\"Align\",options:[\"right\",\"left\"],optionTitles:[\"Right\",\"Left\"],displaySegmentedControl:true,defaultValue:\"right\"},color:{type:ControlType.Color,title:\"Green\",defaultValue:\"#16A34A\"},lightColor:{type:ControlType.Color,title:\"Light green\",defaultValue:\"#DCF3E5\"},seconds:{type:ControlType.Number,title:\"Seconds\",min:1,max:8,step:.5,defaultValue:3,unit:\"s\"},fillMenu:{type:ControlType.Boolean,title:\"Fill menu to bottom\",enabledTitle:\"On\",disabledTitle:\"Off\",defaultValue:true},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:21,fontWeight:500,lineHeight:1.25}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RepairStatusLink\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RepairStatusLink.map"],"mappings":"6MA4BG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,OAAK,OAAK,SAAO,MAAI,QAAM,QAAM,aAAW,UAAQ,OAAK,QAAM,YAAU,EAAY,EAAIA,EAAa,IAAI,EAE/C,MAAoB,CAAC,GAAG,CAAC,GAAiB,IAAS,OAAY,OAAO,IAAI,EAAM,KAAK,EAAI,GAAS,EAAM,GAAI,iCAAiC,KAAK,iBAAiB,CAAE,CAAC,CAAC,eAAe,EAAQ,MAAS,CAAC,GAAG,GAAO,CAAC,EAAI,QAAQ,OAAO,IAAM,EAAM,CAAC,EAAM,EAAG,EAAI,QAAQ,cAAc,EAAM,GAAM,KAAM,GAAI,IAAK,SAAS,MAAK,CAAgB,GAAf,EAAM,KAAK,CAAE,EAAK,iBAAiB,CAAE,CAAC,CAAC,WAAW,QAAQ,CAAC,EAAM,GAAK,KAAM,CAAC,EAAG,EAAG,aAAc,CAAC,GAAG,CAAC,EAAM,OAAO,IAAI,EAAK,KAAK,IAAI,IAAM,KAAK,EAAS,EAAM,CAAC,IAAE,EAAK,GAAK,CAAC,GAAM,EAAK,sBAAsB,CAAC,CAAC,OAAO,EAAO,YAAY,KAAU,EAAM,EAAK,EAAI,EAAK,MAAM,UAAU,EAAK,MAAM,UAAU,SAAS,EAAE,EAAK,EAAE,IAAM,EAAG,WAAW,EAAK,GAAG,EAAE,EAAG,WAAW,EAAK,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