"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../../common/validators/index.cjs"),i=require("../../common/utils/index.cjs"),e=require("vue"),g=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),u={compatConfig:{MODE:3},name:"DtValidationMessages",props:{id:{type:String,default(){return i.getUniqueString()}},validationMessages:{type:Array,default:()=>[],validator:s=>d.validationMessageValidator(s)},showMessages:{type:Boolean,default:!0}},computed:{isFilteredValidationMessagesEmpty(){return this.filteredValidationMessages.length===0},filteredValidationMessages(){return i.filterFormattedMessages(this.validationMessages)},validationState(){return i.getValidationState(this.validationMessages)}},methods:{getMessageKey(s,t){return`validation-message-${s}-${t}-${this.id}`},messageTypeClass(s){return{error:"base-input__message--error d-validation-message--error",warning:"base-input__message--warning d-validation-message--warning",success:"base-input__message--success d-validation-message--success"}[s]}}},c={key:0,class:"base-input__messages d-validation-message__container","data-qa":"validation-messages-container"},m=["innerHTML"];function _(s,t,r,v,M,a){return r.showMessages&&!a.isFilteredValidationMessagesEmpty?(e.openBlock(),e.createElementBlock("div",c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.filteredValidationMessages,({message:o,type:n},l)=>(e.openBlock(),e.createElementBlock("div",{key:a.getMessageKey(n,l),role:"status","aria-live":"polite","data-qa":"validation-message",class:e.normalizeClass(["base-input__message","d-validation-message",a.messageTypeClass(n)])},[e.createElementVNode("p",{innerHTML:o},null,8,m)],2))),128))])):e.createCommentVNode("",!0)}const p=g._(u,[["render",_]]);exports.default=p;
//# sourceMappingURL=validation-messages.cjs.map
