import{a as _,g as b,i as p,A,u as C,r as x,j as l,_ as S,h as E,M as N,aF as P,aV as R,aZ as V,f as g,e4 as y,bD as w,d_ as H,d$ as K,dl as L,dZ as Z,e0 as k}from"./main-343.js";import{F as B}from"./bf-838-284.js";import{I as G}from"./bf-505-323.js";import{F}from"./bf-689-322.js";import{S as q}from"./bf-711-253.js";function T(){const{css:c}=_(),{fieldKey:o}=b(),[d,j]=p(P),[n,$]=p(R),e=A(d[o]),t=C(V),[h,i]=x.useState(!1),[v,M]=x.useState(""),r=s=>{if(e[s]){delete e[s];const I=g(d,a=>{a[o]=e});j(I);const u=g(n,a=>{const{padding:m}=n.fields[t].classes[`.${t}-fld`];s==="prefixIcn"&&(a.fields[t].classes[`.${t}-fld`].padding=y(m,"left",!1)),s==="suffixIcn"&&(a.fields[t].classes[`.${t}-fld`].padding=y(m,"",!1))});$(u),w({event:`${H[s]} Icon Deleted`,type:`delete_${s}`,state:{fldKey:o,fields:I,styles:u}})}},f=s=>{K(n,o,L[s])||Z(t,s),k(s,o),M(s),i(!0)};return l.jsxs(q,{id:"inp-icn-stng",title:S("Input Icons"),className:c(B.fieldSection),toggleChecked:!0,isPro:!0,proProperty:"inputIcons",children:[l.jsxs("div",{className:c(E.mt2),children:[l.jsx(F,{label:"Leading Icon",iconSrc:e==null?void 0:e.prefixIcn,styleRoute:"pre-i",setIcon:()=>f("prefixIcn"),removeIcon:()=>r("prefixIcn")}),l.jsx(F,{label:"Trailing Icon",iconSrc:e==null?void 0:e.suffixIcn,styleRoute:"suf-i",setIcon:()=>f("suffixIcn"),removeIcon:()=>r("suffixIcn")})]}),l.jsxs(N,{md:!0,autoHeight:!0,show:h,setModal:i,className:"o-v",title:S("Icons"),children:[l.jsx("div",{className:"pos-rel"}),l.jsx(G,{iconType:v,setModal:i})]})]})}export{T as I};
