| 1 |
import{i as M,g as T,u as B,ay as $,at as N,r as S,a as C,H as L,j as s,_ as c,M as w,eo as y,f as u,aY as a,bI as b,eq as z,dh as E,er as q,b1 as K}from"./main-96.js";import{F as i}from"./bf-460-326.js";import{A as V}from"./bf-721-323.js";import{I as Y}from"./bf-178-325.js";import{F}from"./bf-285-324.js";import{S as k}from"./bf-283-176.js";import"./bf-542-181.js";import"./bf-781-46.js";import"./bf-678-179.js";import"./bf-245-208.js";import"./bf-870-206.js";import"./bf-687-180.js";import"./bf-551-68.js";import"./bf-200-43.js";import"./bf-431-60.js";/* empty css */import"./bf-63-62.js";import"./bf-762-63.js";import"./bf-163-182.js";function ae(){const[d,p]=M(K),{fieldKey:t}=T(),I=B($),j=B(N),[v,m]=S.useState(!1),[R,H]=S.useState(""),{css:l}=C(),e=L(d[t]),f=(e==null?void 0:e.redoBtn)||"",h=e.adminLbl||"",_=({target:{checked:o}})=>{o?(e.redoBtn=c("Redo"),e.redoBtnHide=!1,y(I,"redoBtn")):(delete e.redoBtn,delete e.redoPreIcn,delete e.redoSufIcn,e.redoBtnHide=!0);const r=o?"on":"off",n=u(d,A=>{A[t]=e});p(n),a(t),b({event:`Redo Button ${r}: ${f||h||t}`,type:`redo_btn_${r}`,state:{fields:n,fldKey:t}})},P=({target:{value:o}})=>{o===""?(delete e.redoBtn,a(t)):e.redoBtn=o;const r=u(d,n=>{n[t]=e});p(r),a(t),b({event:`Redo btn text updated: ${h||e.redoBtn||t}`,type:"change_redo_btn_txt",state:{fields:r,fldKey:t}})},g=o=>{z(j,t,E[o])||y(I,o),q(o,t),H(o),m(!0)},x=o=>{if(e[o]){delete e[o];const r=u(d,n=>{n[t]=e});p(r),a(t)}};return s.jsxs("div",{children:[s.jsxs(k,{id:"redo-button-stng",title:c("Redo Button"),className:l(i.fieldSection,i.hover_tip),switching:!0,tip:c("You can add or remove the Redo button from the Signature field with this toggle."),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(V,{id:"redo-btn-stng",ariaLabel:"Redo Button for this Field",placeholder:"Type redo button txt here...",value:f,changeAction:P})}),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:()=>x("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:()=>x("redoSufIcn"),proProperty:"trailingIcon",position:"suffix"})]})]}),s.jsxs(w,{md:!0,autoHeight:!0,show:v,setModal:m,className:"o-v",title:c("Icons"),children:[s.jsx("div",{className:"pos-rel"}),s.jsx(Y,{iconType:R,setModal:m})]})]})}export{ae as default}; |