import{g as R,i as $,aH as A,a as D,j as e,h as t,_ as n,R as g,f as T,cV as E,cR as H,bG as K}from"./main-634.js";import{F as L}from"./bf-767-388.js";import{l as S}from"./bf-405-465.js";import{t as j}from"./bf-676-386.js";import{A as _}from"./bf-710-385.js";import{F as C}from"./bf-457-387.js";import{C as y}from"./bf-25-81.js";import"./bf-638-271.js";import"./bf-247-269.js";import"./bf-534-247.js";import"./bf-299-245.js";const v={amountType:{dy:"flex !important",fw:600,"& .hover-tip":{oy:0}}};function Q({className:b=""}){var h;const{fieldKey:i}=R(),[p,F]=$(A),{css:o}=D();if(!i)return null;const c=p[i],m=c.config||{},M=(h=c==null?void 0:c.lbl)!=null?h:"",f=(s,l)=>{const x=T(p,d=>{if(d[i].config||(d[i].config={}),l){const u=s.split("->");let r=d[i];u.forEach((a,N)=>{N===u.length-1?r[a]=l:(r[a]||(r[a]={}),r=r[a])})}s==="config->description"&&(l?E(i,"mollieDescriptionMissing"):H({fieldKey:i,errorKey:"mollieDescriptionMissing",errorMsg:n("Mollie Description is Required"),errorUrl:`field-settings/${i}`}))});F(x),K({event:`${s} changed to ${l}: ${M||i}`,type:`${s}_changed`,state:{fields:x,fldKey:i}})};return e.jsxs("div",{className:b,children:[e.jsx("div",{className:o(t.ml2,t.mr2,t.p1),children:e.jsxs("label",{htmlFor:"description",children:[e.jsxs("b",{className:o(v.amountType),children:[n("Description"),e.jsx(y,{children:e.jsx("div",{className:"txt-body",children:e.jsx(g,{html:j.mollieDescription||""})})})]}),e.jsx(_,{id:"description","aria-label":"Mollie description text",placeholder:"Type text here...",value:m.description||"",changeAction:s=>f("config->description",s.target.value)})]})}),e.jsx(C,{}),e.jsx("div",{className:o(t.ml2,t.mr2,t.p1),children:e.jsxs("label",{htmlFor:"locale",children:[e.jsxs("b",{className:o(v.amountType),children:[n("Locale"),e.jsx(y,{children:e.jsx("div",{className:"txt-body",children:e.jsx(g,{html:j.mollieLocale||""})})})]}),e.jsxs("select",{"data-testid":"prfil-locale-slct",onChange:s=>f("config->locale",s.target.value),className:o(L.input),value:m.locale||"",children:[e.jsx("option",{value:"",children:n("Select Locale")}),Object.entries(S).map(([s,l])=>e.jsx("option",{value:s,children:l},s))]})]})})]})}export{Q as default};
