var b=Object.defineProperty,F=Object.defineProperties;var _=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var p=(a,t,l)=>t in a?b(a,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):a[t]=l,m=(a,t)=>{for(var l in t||(t={}))x.call(t,l)&&p(a,l,t[l]);if(c)for(var l of c(t))j.call(t,l)&&p(a,l,t[l]);return a},g=(a,t)=>F(a,_(t));import{a as A,g as C,i as P,aH as $,H as D,j as d,_ as k,I as r,f as V,bG as h}from"./main-634.js";import{t as w}from"./bf-676-386.js";import{F as o}from"./bf-767-388.js";import{S as L}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 T(){const{css:a}=A(),{fieldKey:t}=C(),[l,n]=P($);if(!t)return null;const e=D(l[t]),f=e.adminLbl||"",{defaultValue:y}=e.config,H=({target:{value:s}})=>{if(!r)return;s===""?delete e.config.defaultValue:e.config.defaultValue=s;const i=V(l,u=>{u[t]=e});n(i),h({event:`Default value updated: ${s||e.lbl||f||t}`,type:"change_defaultValue",state:{fields:i,fldKey:t}})},S=s=>{if(!r)return;s.target.checked?(e.config.defaultValue="USD 0.0",e.defaultValueHide=!0):(e.defaultValueHide=!1,delete e.config.defaultValue);const i=s.target.checked?"on":"off",u=V(l,v=>{v[t]=e});n(u),h({event:`Default value ${i}: ${e.lbl||f||t}`,type:`${i.toLowerCase()}_defaultValue`,state:{fields:u,fldKey:t}})};return d.jsx(L,g(m({id:"dflt-val-stng",title:k("Default Amount Value"),className:a(o.fieldSection,o.hover_tip),switching:!0,tip:w.defaultValue,tipProps:{width:250,icnSize:17},toggleAction:S,toggleChecked:(e==null?void 0:e.defaultValueHide)||!1,open:(e==null?void 0:e.defaultValueHide)||!1},r&&{disable:!(e!=null&&e.defaultValueHide)}),{isPro:!0,proProperty:"defaultValue",children:d.jsx("div",{className:a(o.placeholder),children:d.jsx("input",{"data-testid":"dflt-val-stng-inp","aria-label":"Default value for this Field",placeholder:"e.g. USD 100.0",className:a(o.input),type:e.typ,value:y||"",onChange:H})})}))}export{T as default};
