import{a as y,g as v,i as x,aH as I,u as S,k as _,H as b,j as i,_ as u,e7 as j,I as A,e8 as F,f as P,bG as E}from"./main-634.js";import{F as r}from"./bf-767-388.js";import{t as d}from"./bf-676-386.js";import{A as H}from"./bf-710-385.js";import{E as $}from"./bf-178-233.js";import{S as B}from"./bf-982-242.js";import"./bf-638-271.js";import"./bf-247-269.js";import"./bf-25-81.js";import"./bf-692-111.js";import"./bf-400-72.js";import"./bf-438-114.js";import"./bf-486-243.js";import"./bf-497-246.js";import"./bf-723-244.js";import"./bf-299-245.js";import"./bf-534-247.js";import"./bf-962-248.js";import"./bf-343-249.js";import"./bf-791-250.js";import"./bf-641-107.js";import"./bf-570-251.js";import"./bf-838-80.js";import"./bf-297-103.js";import"./bf-284-252.js";import"./bf-17-106.js";import"./bf-671-253.js";import"./bf-334-254.js";import"./bf-423-273.js";import"./bf-457-387.js";import"./bf-577-275.js";import"./bf-288-389.js";import"./bf-939-390.js";function ct(){const{css:a}=y(),{fieldKey:s}=v(),[p,c]=x(I),f=S(_);if(!s)return null;const t=b(p[s]),k=t.adminLbl||"",o=t.valid.inputMask||"",e=f.err||{},M=g=>{var l;if(!A)return;const{value:n}=g.target;n===""?delete t.valid.inputMask:(t.valid.inputMask=F(n),t.err||(t.err={}),t.err.inputMask||(t.err.inputMask={}),t.err.inputMask.dflt=((l=e[t.typ])==null?void 0:l.inputMask)||(e==null?void 0:e.inputMask)||`<p style="margin:0">${u("Pattern not matched")}</p>`,t.err.inputMask.show=!0);const m=P(p,h=>{h[s]=t});c(m),E({event:`Input Mask updated: ${t.lbl||k||s}`,type:"set_input_mask",state:{fields:m,fldKey:s}})};return i.jsx(B,{id:"inp-msk-stng",title:u("Input Mask"),className:a(r.fieldSection,r.hover_tip),tip:d.inputMask,tipProps:{width:250,icnSize:17},children:i.jsxs("div",{className:a(r.placeholder),children:[i.jsx(H,{id:"input-mask",ariaLabel:"Input mask for this Field",placeholder:"e.g. (999) 999-9999",list:"patterns",value:j(o),changeAction:M}),o&&i.jsx($,{id:"ptrn-stng-expn",type:"inputMask",title:"Error Message",tipTitle:d.patternsErrMsg})]})})}export{ct as default};
