import{a as g,g as V,i as y,aH as b,H,j as d,_ as v,f,bG as p}from"./main-634.js";import{t as x}from"./bf-676-386.js";import{F as i}from"./bf-767-388.js";import{S as F}from"./bf-982-242.js";import"./bf-638-271.js";import"./bf-247-269.js";import"./bf-25-81.js";import"./bf-497-246.js";import"./bf-641-107.js";import"./bf-400-72.js";import"./bf-438-114.js";function E(){const{css:u}=g(),{fieldKey:t}=V(),[o,r]=y(b);if(!t)return null;const e=H(o[t]),n=e.adminLbl||"",c=({target:{value:l}})=>{l===""?delete e.defaultValue:e.defaultValue=l;const a=f(o,s=>{s[t]=e});r(a),p({event:`Default value updated: ${l||e.lbl||n||t}`,type:"change_defaultValue",state:{fields:a,fldKey:t}})},m=l=>{l.target.checked?e.defaultValueHide=!0:(e.defaultValueHide=!1,delete e.defaultValue);const a=l.target.checked?"on":"off",s=f(o,h=>{h[t]=e});r(s),p({event:`Default value ${a}: ${e.lbl||n||t}`,type:`${a.toLowerCase()}_defaultValue`,state:{fields:s,fldKey:t}})};return d.jsx(F,{id:"dflt-val-stng",title:v("Default Phone Number"),className:u(i.fieldSection,i.hover_tip),switching:!0,tip:x.defaultValue,tipProps:{width:250,icnSize:17},toggleAction:m,toggleChecked:(e==null?void 0:e.defaultValueHide)||!1,open:(e==null?void 0:e.defaultValueHide)||!1,disable:!(e!=null&&e.defaultValueHide),proProperty:"defaultValue",children:d.jsx("div",{className:u(i.placeholder),children:d.jsx("input",{"data-testid":"dflt-val-stng-inp","aria-label":"Default value for this Field",placeholder:"Type a phone number.. (Ex: +01 555 1523)",className:u(i.input),type:"text",value:(e==null?void 0:e.defaultValue)||"",onChange:c})})})}export{E as default};
