import{html as e}from"lit";import{i18next as t}from"@openremote/or-translate";export class ModalService{confirmation(o,i=t.t("flowEditor","Flow editor"),n=t.t("areYouSure","Are you sure?")){this.element.content=e`<confirmation-dialog 
        .question = "${n}"
        @agreed="${()=>{o&&o(),this.element.close()}}"
        @disagreed="${this.element.close}"
        ></confirmation-dialog>`,this.element.header=i,this.element.open()}notification(o,i,n=t.t("ok","OK")){this.element.content=e`<notification-dialog 
        .message = "${i}"
        @closed = "${this.element.close}"
        ></notification-dialog>`,this.element.header=o,this.element.open()}anything(e,t){this.element.content=t,this.element.header=e,this.element.open()}}