import{i as A,aH as T,g as $,u as h,b2 as N,aX as C,r as b,a as L,H as w,j as s,_ as u,M as z,e9 as y,f as m,ba as c,bG as S,eb as E,d5 as K,ec as V}from"./main-634.js";import{t as q,F}from"./bf-676-386.js";import{F as i}from"./bf-767-388.js";import{A as G}from"./bf-710-385.js";import{I as X}from"./bf-457-387.js";import{S as k}from"./bf-982-242.js";import"./bf-638-271.js";import"./bf-247-269.js";import"./bf-25-81.js";import"./bf-534-247.js";import"./bf-299-245.js";import"./bf-497-246.js";import"./bf-641-107.js";import"./bf-400-72.js";import"./bf-438-114.js";function de(){const[d,a]=A(T),{fieldKey:t}=$(),I=h(N),j=h(C),[H,p]=b.useState(!1),[v,R]=b.useState(""),{css:l}=L(),e=w(d[t]),f=(e==null?void 0:e.redoBtn)||"",x=e.adminLbl||"",_=({target:{checked:o}})=>{o?(e.redoBtn=u("Redo"),e.redoBtnHide=!1,y(I,"redoBtn")):(delete e.redoBtn,delete e.redoPreIcn,delete e.redoSufIcn,e.redoBtnHide=!0);const n=o?"on":"off",r=m(d,P=>{P[t]=e});a(r),c(t),S({event:`Redo Button ${n}:  ${f||x||t}`,type:`redo_btn_${n}`,state:{fields:r,fldKey:t}})},M=({target:{value:o}})=>{o===""?(delete e.redoBtn,c(t)):e.redoBtn=o;const n=m(d,r=>{r[t]=e});a(n),c(t),S({event:`Redo btn text updated: ${x||e.redoBtn||t}`,type:"change_redo_btn_txt",state:{fields:n,fldKey:t}})},g=o=>{E(j,t,K[o])||y(I,o),V(o,t),R(o),p(!0)},B=o=>{if(e[o]){delete e[o];const n=m(d,r=>{r[t]=e});a(n),c(t)}};return s.jsxs("div",{children:[s.jsxs(k,{id:"redo-button-stng",title:u("Redo Button"),className:l(i.fieldSection,i.hover_tip),switching:!0,tip:q.redoBtn,tipProps:{width:250,icnSize:17},toggleAction:_,toggleChecked:!(e!=null&&e.redoBtnHide),open:!(e!=null&&e.redoBtnHide),disable:e==null?void 0:e.redoBtnHide,children:[s.jsx("div",{className:l(i.placeholder),children:s.jsx(G,{id:"redo-btn-stng",ariaLabel:"Redo Button for this Field",placeholder:"Type redo button txt here...",value:f,changeAction:M})}),s.jsxs("div",{className:l(i.iconLayoutHorizontal),children:[s.jsx(F,{label:"Leading Icon",iconSrc:e==null?void 0:e.redoPreIcn,styleRoute:"redo-btn-pre-i",setIcon:()=>g("redoPreIcn"),removeIcon:()=>B("redoPreIcn"),proProperty:"leadingIcon",position:"prefix"}),s.jsx("span",{className:l(i.iconSeparator),children:"|"}),s.jsx(F,{label:"Trailing Icon",iconSrc:e==null?void 0:e.redoSufIcn,styleRoute:"redo-btn-suf-i",setIcon:()=>g("redoSufIcn"),removeIcon:()=>B("redoSufIcn"),proProperty:"trailingIcon",position:"suffix"})]})]}),s.jsxs(z,{md:!0,autoHeight:!0,show:H,setModal:p,className:"o-v",title:u("Icons"),children:[s.jsx("div",{className:"pos-rel"}),s.jsx(X,{iconType:v,setModal:p})]})]})}export{de as default};
