import{h as s,c as t,r as a}from"./p-083180bf.js";import{n as o}from"./p-a7fc1e02.js";import{B as c}from"./p-d0993bb9.js";import{g as e}from"./p-9ec99ced.js";const n=a=>{const{states:o,callbacks:c}=a,{styles:e}=o;return s(t,{class:"squatch-container"},s("div",{style:{padding:a.states.styles.padding},part:"sqm-base"},e.closeButton&&s("span",{part:"sqm-close-button",class:"close squatch-header-close","data-close-panel":"#squatch-panel",onClick:()=>c.closePopup()},e.closeButtonText),s("slot",null),e.poweredBy?s("a",{class:"sqh-attribution",href:"https://impact.com/advocate/",target:"_blank"},e.poweredByText):""))},r=class{constructor(s){a(this,s),this.poweredByText="Powered By",o(this)}disconnectedCallback(){}render(){const t=e(this);return s(n,Object.assign({},function(s){const t=c(),a=s.popupPadding?"none"===s.popupPadding?"0":`var(--sl-spacing-${s.popupPadding})`:"var(--sl-spacing-medium)",o=s.embedPadding?"none"===s.embedPadding?"0":`var(--sl-spacing-${s.embedPadding})`:"0",e="POPUP"===c()?a:o;return{states:{showCloseButton:s.closeButton&&"POPUP"===t,styles:{...s,padding:e,closeButtonText:s.closeButtonText?s.closeButtonText:"X",poweredByText:s.poweredByText}},data:{},callbacks:{closePopup:function(){var s;"POPUP"===c()&&(null===(s=window.frameElement.squatchJsApi)||void 0===s||s.close())}}}}(t)))}};r.style=".squatch-header-close{position:absolute;right:20px;top:10px;cursor:pointer}.squatch-container{background-color:var(--widget-background-color);display:block}";export{r as sqm_popup_container}