import{a as y,g as h,i as $,aH as j,ap as P,aX as S,H as R,_ as i,j as n,f as m,bG as w}from"./main-634.js";import{F as c}from"./bf-767-388.js";import{S as F}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:l}=y(),{fieldKey:e}=h(),[d,f]=$(j),u=P(S);if(!e)return null;const t=R(d[e]),g=(t==null?void 0:t.ratingPos)||"start",v=[{name:i("Left"),value:"start"},{name:i("Center"),value:"center"},{name:i("Right"),value:"end"}],x=({target:s})=>{const{value:a}=s,p=m(d,o=>{o[e].ratingPos=a});u(o=>m(o,r=>{r.fields[e].classes[`.${e}-inp-fld-wrp`]["justify-content"]=a,a==="end"?r.fields[e].classes[`.${e}-inp-fld-wrp`]["flex-direction"]="row-reverse":delete r.fields[e].classes[`.${e}-inp-fld-wrp`]["flex-direction"]})),f(p),w({event:`Rating position changed to ${a}: ${t.lbl||e}`,type:"review_start_pos",state:{fields:p,fldKey:e}})};return n.jsx(F,{id:"rating-algn",title:i("Rating Position"),className:l(c.fieldSection),children:n.jsx("div",{className:l(c.placeholder),children:n.jsx("select",{"data-testid":"rating-algn-slct",className:l(c.input),value:g,onChange:x,children:v.map(s=>n.jsx("option",{value:s.value,children:s.name},`rating-pos-${s.value}`))})})})}export{E as default};
