import{FormView}from"./base.mjs";import{ElementBuilder}from"../../base/builder.mjs";const E=new ElementBuilder;class ConfirmFormView extends FormView{static showCancel=!0;constructor(e,s){super(e),this.message=s}async build(){let e=await super.build();return e.prepend(E.p().class("confirm").content(this.message)),e}}class YesNoFormView extends ConfirmFormView{static submitLabel="Yes";static cancelLabel="No";onYes(e){this.onSubmit(e)}onNo(e){this.onCancel(e)}}export{ConfirmFormView,YesNoFormView};
