import{a as b,g as _,i as x,aH as B,aX as S,H as N,_ as r,j as n,f as d,bG as h}from"./main-634.js";import{F as o}from"./bf-767-388.js";import{S as v}from"./bf-982-242.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 E(){const{css:i}=b(),{fieldKey:e}=_(),[c,m]=x(B),[C,p]=x(S);if(!e)return null;const s=N(c[e]),{align:j,txtAlign:y,fulW:g}=s,f=[{name:r("Left"),value:"start"},{name:r("Center"),value:"center"},{name:r("Right"),value:"end"}],A=t=>{const{value:a}=t.target;p(l=>d(l,u=>{u.fields[e].classes[`.${e}-inp-fld-wrp`]["justify-content"]=a})),s.align=a,m(d(c,l=>{l[e]=s})),h({event:`Button Alignment changed to ${a}: ${s.txt}`,type:"set_btn_align",state:{fields:c,fldKey:e}})},$=t=>{const{value:a}=t.target;p(l=>d(l,u=>{u.fields[e].classes[`.${e}-btn`]["justify-content"]=a})),s.txtAlign=a,m(d(c,l=>{l[e]=s})),h({event:`Button Text Alignment changed to ${a}: ${s.txt}`,type:"set_btn_text_align",state:{fields:c,fldKey:e}})};return g?g?n.jsx(v,{id:"txt-algn",title:r("Text Align"),className:i(o.fieldSection),open:!0,children:n.jsx("div",{className:i(o.placeholder),children:n.jsx("select",{"data-testid":"txt-algn-slct",className:i(o.input),value:y||"center",onChange:$,children:f.map(t=>n.jsx("option",{value:t.value,children:t.name},`btcd-k-${t.name}`))})})}):null:n.jsx(v,{id:"btn-algn",title:r("Button Align"),className:i(o.fieldSection),open:!0,children:n.jsx("div",{className:i(o.placeholder),children:n.jsx("select",{"data-testid":"btn-algn-slct",className:i(o.input),value:j,onChange:A,children:f.map(t=>n.jsx("option",{value:t.value,children:t.name},`btcd-k-${t.name}`))})})})}export{E as default};
