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