export const __rspack_esm_id="21832";export const __rspack_esm_ids=["21832"];export const __webpack_modules__={83387(o,a,i){i.a(o,async function(o,s){try{i.r(a),i.d(a,{DialogManageCloudhook:()=>m});var t=i(62826),e=i(96196),l=i(97735),n=i(1087),c=(i(93444),i(65063)),h=i(14503),d=i(36918),r=i(18350),_=i(99887),u=i(72554),g=o([r,_,u]);[r,_,u]=g.then?(await g)():g;const p="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z";class m extends e.WF{showDialog(o){this._params=o,this._open=!0}closeDialog(){this._open=!1}_dialogClosed(){this._open=!1,this._params=void 0,(0,n.r)(this,"dialog-closed",{dialog:this.localName})}render(){if(!this._params)return e.s6;const{webhook:o,cloudhook:a}=this._params,i="automation"===o.domain?(0,d.o)(this.hass,"/docs/automation/trigger/#webhook-trigger"):(0,d.o)(this.hass,`/integrations/${o.domain}/`);return e.qy` <ha-dialog .hass="${this.hass}" .open="${this._open}" header-title="${this.hass.localize("ui.panel.config.cloud.dialog_cloudhook.webhook_for",{name:o.name})}" @closed="${this._dialogClosed}"> <div> <p> ${a.managed?e.qy` ${this.hass.localize("ui.panel.config.cloud.dialog_cloudhook.info_disable_webhook")} <button class="link" @click="${this._disableWebhook}"> ${this.hass.localize("ui.panel.config.cloud.dialog_cloudhook.link_disable_webhook")}</button>. `:e.qy` ${this.hass.localize("ui.panel.config.cloud.dialog_cloudhook.managed_by_integration")} `} </p> <ha-copy-textfield .hass="${this.hass}" .value="${a.cloudhook_url}" .label="${this.hass.localize("ui.panel.config.common.copy_link")}"></ha-copy-textfield> </div> <ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" href="${i}" target="_blank" rel="noreferrer" appearance="plain"> ${this.hass.localize("ui.panel.config.cloud.dialog_cloudhook.view_documentation")} <ha-svg-icon slot="end" .path="${p}"></ha-svg-icon> </ha-button> <ha-button slot="primaryAction" @click="${this.closeDialog}"> ${this.hass.localize("ui.panel.config.cloud.dialog_cloudhook.close")} </ha-button> </ha-dialog-footer> </ha-dialog> `}async _disableWebhook(){await(0,c.dk)(this,{title:this.hass.localize("ui.panel.config.cloud.dialog_cloudhook.confirm_disable_title"),text:this.hass.localize("ui.panel.config.cloud.dialog_cloudhook.confirm_disable_text",{name:this._params.webhook.name}),dismissText:this.hass.localize("ui.common.cancel"),confirmText:this.hass.localize("ui.common.disable"),destructive:!0})&&(this._params.disableHook(),this.closeDialog())}static get styles(){return[h.RF,h.nA,e.AH`button.link{color:var(--primary-color);text-decoration:none}p{margin-top:0;margin-bottom:16px}`]}constructor(...o){super(...o),this._open=!1}}(0,t.Cg)([(0,l.wk)()],m.prototype,"_params",void 0),(0,t.Cg)([(0,l.wk)()],m.prototype,"_open",void 0),m=(0,t.Cg)([(0,l.EM)("dialog-manage-cloudhook")],m),s()}catch(o){s(o)}})}};
//# sourceMappingURL=21832.b643f542cad6e2c7.js.map