import{_ as i,j as a,e as t,t as s,i as o,y as e,eU as r,p as l,k as n,O as d,d as c,n as m}from"./main-85e087f9.js";import"./c.7d6b8ecd.js";import"./c.f4985284.js";import"./c.8e28b461.js";i([m("dialog-box")],(function(i,a){return{F:class extends a{constructor(...a){super(...a),i(this)}},d:[{kind:"field",decorators:[t({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[s()],key:"_params",value:void 0},{kind:"field",decorators:[o("ha-textfield")],key:"_textField",value:void 0},{kind:"method",key:"showDialog",value:async function(i){this._params=i}},{kind:"method",key:"closeDialog",value:function(){var i,a;return!(null!==(i=this._params)&&void 0!==i&&i.confirmation||null!==(a=this._params)&&void 0!==a&&a.prompt)&&(!this._params||(this._dismiss(),!0))}},{kind:"method",key:"render",value:function(){if(!this._params)return e``;const i=this._params.confirmation||this._params.prompt;return e` `:""}${this._params.title?this._params.title:this._params.confirmation&&this.hass.localize("ui.dialogs.generic.default_confirmation_title")}`} >
${this._params.text?e`

${this._params.text}

`:""} ${this._params.prompt?e` `:""}
${i&&e` ${this._params.dismissText?this._params.dismissText:this.hass.localize("ui.dialogs.generic.cancel")} `} ${this._params.confirmText?this._params.confirmText:this.hass.localize("ui.dialogs.generic.ok")}
`}},{kind:"method",key:"_dismiss",value:function(){var i;null!==(i=this._params)&&void 0!==i&&i.cancel&&this._params.cancel(),this._close()}},{kind:"method",key:"_confirm",value:function(){var i;this._params.confirm&&this._params.confirm(null===(i=this._textField)||void 0===i?void 0:i.value);this._close()}},{kind:"method",key:"_dialogClosed",value:function(i){"ignore"!==i.detail.action&&this._dismiss()}},{kind:"method",key:"_close",value:function(){this._params&&(this._params=void 0,d(this,"dialog-closed",{dialog:this.localName}))}},{kind:"get",static:!0,key:"styles",value:function(){return c` :host([inert]) { pointer-events: initial !important; cursor: initial !important; } a { color: var(--primary-color); } p { margin: 0; color: var(--primary-text-color); } .no-bottom-padding { padding-bottom: 0; } .secondary { color: var(--secondary-text-color); } .destructive { --mdc-theme-primary: var(--error-color); } ha-dialog { --mdc-dialog-heading-ink-color: var(--primary-text-color); --mdc-dialog-content-ink-color: var(--primary-text-color); /* Place above other dialogs */ --dialog-z-index: 104; } @media all and (min-width: 600px) { ha-dialog { --mdc-dialog-min-width: 400px; } } ha-textfield { width: 100%; } `}}]}}),a);