import{i as o,w as t,r as e,h as r,H as i,e as s}from"./p-03169580.js";import{g as n}from"./p-4cb16df5.js";import{f as a,p as l,g as f}from"./p-9817ba8b.js";import{a as p}from"./p-f44f0a67.js";import"./p-9a866be1.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const c=(e,r)=>{o((()=>{const o=e.scrollTop;const i=e.scrollHeight-e.clientHeight;const s=10;const n=i-s;const a=o-n;const l=p(0,1-a/s,1);t((()=>{r.style.setProperty("--opacity-scale",l.toString())}))}))};const d="ion-footer{display:block;position:relative;order:1;width:100%;z-index:10}ion-footer ion-toolbar:last-of-type{padding-bottom:var(--ion-safe-area-bottom, 0)}.footer-ios ion-toolbar:first-of-type{--border-width:0.55px 0 0}@supports (backdrop-filter: blur(0)){.footer-background{left:0;right:0;top:0;bottom:0;position:absolute;backdrop-filter:saturate(180%) blur(20px)}.footer-translucent-ios ion-toolbar{--opacity:.8}}.footer-ios.ion-no-border ion-toolbar:first-of-type{--border-width:0}.footer-collapse-fade ion-toolbar{--opacity-scale:inherit}";const A='ion-footer{display:block;position:relative;order:1;width:100%;z-index:10}ion-footer ion-toolbar:last-of-type{padding-bottom:var(--ion-safe-area-bottom, 0)}.footer-md::before{left:0;top:-2px;bottom:auto;background-position:left 0 top 0;position:absolute;width:100%;height:2px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAHBAMAAADzDtBxAAAAD1BMVEUAAAAAAAAAAAAAAAAAAABPDueNAAAABXRSTlMUCS0gBIh/TXEAAAAaSURBVAjXYxCEAgY4UIICBmMogMsgFLtAAQCNSwXZKOdPxgAAAABJRU5ErkJggg==");background-repeat:repeat-x;content:""}[dir=rtl] .footer-md::before,:host-context([dir=rtl]) .footer-md::before{left:unset;right:unset;right:0}[dir=rtl] .footer-md::before,:host-context([dir=rtl]) .footer-md::before{background-position:right 0 top 0}.footer-md.ion-no-border::before{display:none}';let b=class{constructor(o){e(this,o);this.translucent=false;this.checkCollapsibleFooter=()=>{const o=n(this);if(o!=="ios"){return}const{collapse:t}=this;const e=t==="fade";this.destroyCollapsibleFooter();if(e){const o=this.el.closest("ion-app,ion-page,.ion-page,page-inner");const t=o?a(o):null;if(!t){l(this.el);return}this.setupFadeFooter(t)}};this.setupFadeFooter=async o=>{const t=this.scrollEl=await f(o);this.contentScrollCallback=()=>{c(t,this.el)};t.addEventListener("scroll",this.contentScrollCallback);c(t,this.el)}}componentDidLoad(){this.checkCollapsibleFooter()}componentDidUpdate(){this.checkCollapsibleFooter()}destroyCollapsibleFooter(){if(this.scrollEl&&this.contentScrollCallback){this.scrollEl.removeEventListener("scroll",this.contentScrollCallback);this.contentScrollCallback=undefined}}render(){const{translucent:o,collapse:t}=this;const e=n(this);return r(i,{role:"contentinfo",class:{[e]:true,[`footer-${e}`]:true,[`footer-translucent`]:o,[`footer-translucent-${e}`]:o,[`footer-collapse-${t}`]:t!==undefined}},e==="ios"&&o&&r("div",{class:"footer-background"}),r("slot",null))}get el(){return s(this)}};b.style={ios:d,md:A};export{b as ion_footer};
//# sourceMappingURL=p-b3580875.entry.js.map