import{h,Host}from"@stencil/core";export class OntoCookieConsent{constructor(){this.showModal=!1,this.openModal=e=>{e.preventDefault(),this.showModal=!0},this.handleConsentClick=()=>{this.consentGiven.emit()}}onDialogClose(){this.showModal=!1}render(){return h(Host,{key:"346645fd9b90c8691e360c80236e76fd0e2fc012"},h("div",{key:"4b503b13da213b61d51067dba0db889002d7402e",class:"cookie-consent-banner"},h("section",{key:"bc338d56145bb0052f207c08873b750ab37c84d0",class:"cookie-consent-content"},h("span",{key:"2f29671173dcc7c196cfcdbbac0c6e284d74b41a"},h("translate-label",{key:"8b19163b3ff9898e65100e6b897f5811c3b8fdf5",labelKey:"cookie.cookie_consent"}),h("a",{key:"74669efefdf13c81f705a09532141b541331034f",id:"cookie-policy-link",href:"#",onClick:this.openModal,class:"btn btn-link p-0"},h("translate-label",{key:"e62339a76e736b7e7b30648f7d35a28a7f7e5ae0",labelKey:"cookie.cookie_policy_url_label"})),"."),h("button",{key:"c33a96dcc8afcfc548e1ec96416b59129bb00c40",id:"accept-cookie-policy",class:"onto-btn onto-btn-primary",onClick:this.handleConsentClick},h("translate-label",{key:"a96cf61a6e8b7ae3246354c2d08865a154c45509",labelKey:"common.button.ok"})))),this.showModal&&h("onto-cookie-policy-dialog",{key:"3fdf52922a2a95776ecef8fbd144f1fa1c350ea1"}))}static get is(){return"onto-cookie-consent"}static get originalStyleUrls(){return{$:["onto-cookie-consent.scss"]}}static get styleUrls(){return{$:["onto-cookie-consent.css"]}}static get states(){return{showModal:{}}}static get events(){return[{method:"consentGiven",name:"consentGiven",bubbles:!0,cancelable:!0,composed:!0,docs:{tags:[],text:"Event emitter for when consent is given"},complexType:{original:"void",resolved:"void",references:{}}}]}static get listeners(){return[{name:"closeDialog",method:"onDialogClose",target:void 0,capture:!1,passive:!1}]}}