import{_ as f}from"./ButtonDefault-BIBStZbJ.js";import{_ as r}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{c as s,o as d,a as m,b as l,h as _,t as c,f as v,H as x,s as M}from"./index-CmCGXBst.js";const h={},y={width:"32",height:"30",viewBox:"0 0 32 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function C(a,e){return d(),s("svg",y,e[0]||(e[0]=[m("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.097 0.443427C15.41 -0.147809 16.257 -0.147809 16.57 0.443427L31.57 28.7768C31.8638 29.3318 31.4615 30 30.8335 30H0.833499C0.20552 30 -0.196815 29.3318 0.0970092 28.7768L15.097 0.443427ZM15.8335 18.3333C16.2937 18.3333 16.6668 17.9602 16.6668 17.5V10.8333C16.6668 10.3731 16.2937 10 15.8335 10C15.3733 10 15.0002 10.3731 15.0002 10.8333V17.5C15.0002 17.9602 15.3733 18.3333 15.8335 18.3333ZM16.6668 23.3333V21.6667H15.0002V23.3333H16.6668ZM29.4494 28.3333H2.21759L15.8335 2.61439L29.4494 28.3333Z",fill:"#DD0035"},null,-1)]))}const E=r(h,[["render",C]]),k={props:{data:{type:Object,default:()=>{}}},emits:["modalClose"],setup(a,{emit:e}){const t=v(()=>{const o=a.data?.message?.String||a.data?.Exception?.String||a.data?.ErrorIP||a.data?.msg;return o&&typeof o=="string"&&o.includes("<div>")});function n(){e("modalClose")}const i=o=>{o.key==="Enter"&&n()};return x(()=>{document.addEventListener("keyup",i)}),M(()=>{document.removeEventListener("keyup",i)}),{closeModal:n,isHtmlMessage:t}}},H={class:"modal__body"},w={class:"modal__info"},L=["innerHTML"],S={key:1,class:"modal__alert-text"},b={key:2,class:"modal__alert-text"},V=["src"];function B(a,e,t,n,i,o){const u=E,g=f;return d(),s("div",H,[l(u,{class:"modal__alert-icon"}),m("div",w,[n.isHtmlMessage?(d(),s("div",{key:0,class:"modal__alert-text",innerHTML:t.data?.message?.String||t.data?.Exception?.String||t.data?.ErrorIP||t.data?.msg},null,8,L)):(d(),s("div",S,c(t.data?.message?.String||t.data?.Exception?.String||t.data?.ErrorIP||t.data?.msg),1)),t.data?.message?.Parent&&!n.isHtmlMessage?(d(),s("div",b,c(t.data?.message?.Parent?.String),1)):_("",!0),t.data?.additional_image?(d(),s("img",{key:3,class:"modal__alert-image",src:t.data?.additional_image,alt:""},null,8,V)):_("",!0)]),l(g,{class:"modal__alert-button",label:"ОК",onClick:e[0]||(e[0]=P=>n.closeModal())})])}const N=r(k,[["render",B],["__scopeId","data-v-0d1b72d8"]]);export{N as default};
