import{g as P,i as y,A as x,a as F,j as r,_ as H,f as h,bD as n,aF as b}from"./main-343.js";import{F as o}from"./bf-838-284.js";import{t as v}from"./bf-689-322.js";import{S}from"./bf-711-253.js";function A(){const{fieldKey:l}=P(),[i,c]=y(b),e=x(i[l]),{css:d}=F(),p=e.adminLbl||"",m=e.ph||"",g=t=>{t.target.checked?(e.ph="Placeholder Text...",e.phHide=!0):(e.phHide=!1,delete e.ph);const s=t.target.checked?"Show":"Hide",a=h(i,f=>{f[l]=e});c(a),n({event:`${s} Placeholder: ${e.lbl||p||l}`,type:`${s.toLowerCase()}_placeholder`,state:{fields:a,fldKey:l}})};function u(t){t.target.value===""?delete e.ph:e.ph=t.target.value;const s=h(i,a=>{a[l]=e});c(s),n({event:`Placeholder updated "${e.ph}": ${e.lbl||p||l}`,type:"change_placeholder",state:{fields:s,fldKey:l}})}return r.jsx(S,{id:"plchldr-stng",title:H("Placeholder"),className:d(o.fieldSection,o.hover_tip),switching:!0,tip:v.placeholder,tipProps:{width:250,icnSize:17},toggleAction:g,toggleChecked:e==null?void 0:e.phHide,open:e==null?void 0:e.phHide,disable:!(e!=null&&e.phHide),children:r.jsx("div",{className:d(o.placeholder),children:r.jsx("input",{"data-testid":"plchldr-stng-inp","aria-label":"Placeholer for this Field",placeholder:"Type Placeholder here...",className:d(o.input),type:"text",value:m,onChange:u})})})}export{A as P};
