"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../tslib.es6-C4EgNkz1.js"),o=require("react"),d=require("classnames"),m=require("../dialog-previous-button-D-rmw6O1.js");require("../icon-button-AJ6dtyvc.js");require("../icon-I30uh1Ov.js");const v=require("../button-xYFMCdP0.js"),i="alert-dialog",p=n=>{var r,t,{a11yCloseText:u="Close Dialog",confirmText:l,confirm:e,onConfirm:f=()=>{}}=n,a=b.__rest(n,["a11yCloseText","confirmText","confirm","onConfirm"]);const s=o.useRef(null),g="alert-dialog-confirm",c="alert-dialog-main";if(!l&&!e)throw new Error('EbayAlertDialog: A "confirmText" or a "confirm" component needs to be passed');return o.createElement(m.DialogBaseWithState,Object.assign({focus:s},a,{a11yCloseText:u,role:"alertdialog",classPrefix:i,ignoreEscape:!0,mainId:c,buttonPosition:"hidden",className:d(a.className,`${i}--mask-fade`),windowClass:`${i}__window ${i}__window--animate`}),a.children,o.createElement(m.EbayDialogFooter,null,o.createElement(v.EbayButton,Object.assign({priority:"primary",onClick:f},e?.props,{"aria-describedby":c,ref:s,id:g,className:d("alert-dialog__acknowledge",(r=e?.props)===null||r===void 0?void 0:r.className)}),((t=e?.props)===null||t===void 0?void 0:t.children)||l)))};exports.EbayAlertDialog=p;
