var A=Object.defineProperty,D=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var y=(s,i,e)=>i in s?A(s,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[i]=e,F=(s,i)=>{for(var e in i||(i={}))B.call(i,e)&&y(s,e,i[e]);if(b)for(var e of b(i))I.call(i,e)&&y(s,e,i[e]);return s},S=(s,i)=>D(s,w(i));import{g as M,i as N,A as E,a as K,r as f,j as t,M as $,_ as L,b as C,f as g,bD as H,aF as T,aq as z,h as a,E as P,R,t as q,aI as V}from"./main-343.js";import{s as W}from"./bf-810-248.js";import{F as v}from"./bf-838-284.js";import{d as G,C as J}from"./bf-649-79.js";import{F as O,A as Q,b as U,c as X}from"./bf-622-233.js";import{F as Y}from"./bf-773-387.js";import{F as d}from"./bf-505-323.js";import"./bf-603-251.js";import"./bf-453-86.js";import"./bf-190-88.js";import"./bf-697-110.js";import"./bf-90-70.js";import"./bf-594-113.js";import"./bf-983-247.js";import"./bf-914-249.js";import"./bf-870-250.js";import"./bf-411-252.js";import"./bf-711-253.js";import"./bf-519-87.js";import"./bf-901-254.js";import"./bf-656-255.js";import"./bf-806-256.js";import"./bf-318-257.js";import"./bf-437-78.js";import"./bf-689-322.js";import"./bf-123-272.js";import"./bf-772-285.js";import"./bf-209-80.js";import"./bf-529-105.js";import"./bf-730-282.js";import"./bf-623-283.js";function Z({labelModal:s,setLabelModal:i}){var h;const{fieldKey:e}=M(),[r,c]=N(T),o=E(r[e]),{css:l}=K(),n=o.content||((h=o==null?void 0:o.info)==null?void 0:h.content),[x,m]=f.useState(n);f.useEffect(()=>{s&&m(n)},[s]);const _=p=>{const u=g(r,k=>{k[e].content=p});c(u),H({event:"Modify HTML Content Label",type:"html_content_label",state:{fields:u,fldKey:e}})},j=()=>{o.content=x;const p=g(r,u=>{u[e]=o});c(p),i(!1),H({event:"Cancel HTML Content Label ",type:"cancel_html_content_label",state:{fields:p,fldKey:e}})};return t.jsxs($,{md:!0,show:s,setModal:j,title:L("Edit HTML Content"),children:[t.jsx(G,{id:e,value:n,onChangeHandler:_}),t.jsxs("div",{className:"mt-2 f-right",children:[t.jsx("button",{type:"button",className:`${l(C.btn)} mr-2`,onClick:j,children:"Cancel"}),t.jsx("button",{type:"button",className:`${l(C.btn)} blue`,onClick:()=>i(!1),children:"Save"})]})]})}function _t(){const{fieldKey:s}=M(),[i,e]=N(T),r=z(V),c=E(i[s]),[o,l]=f.useState(!1),{css:n}=K(),x=()=>{r(m=>S(F({},m),{reCalculateSpecificFldHeight:{fieldKey:s,counter:m.reCalculateSpecificFldHeight.counter+1}}))};return f.useEffect(()=>{x()},[c.content]),t.jsxs("div",{children:[t.jsx(O,{title:"Field Settings",subtitle:c.typ,fieldKey:s}),t.jsx(Q,{}),t.jsx(d,{}),t.jsx(U,{}),t.jsx(d,{}),t.jsxs("div",{className:n(v.fieldSection),children:[t.jsxs("div",{className:n(a.flxcb),children:[t.jsxs("div",{className:n(a.flxc),children:[t.jsx("b",{children:"Content: "}),t.jsx(J,{width:250,icnSize:17,className:n(a.ml2),children:t.jsx("div",{className:n(a.tipBody),children:L("Edit the HTML field content by clicking on edit icon")})})]}),t.jsx("span",{"data-testid":"cntnt-edt-btn",role:"button",tabIndex:"-1",className:n(a.mr2,a.cp),onClick:()=>l(!0),onKeyDown:()=>l(!0),children:t.jsx(P,{size:19})})]}),t.jsx("div",{"data-testid":"cntnt",role:"button",tabIndex:"-1",className:n(v.input,a.px10,a.py5,W.childPmargin0,{h:"auto",fs:"12px !important"}),onClick:()=>l(!0),onKeyDown:()=>l(!0),children:t.jsx(R,{html:q(c.content)})})]}),t.jsx(Z,{labelModal:o,setLabelModal:l}),t.jsx(d,{}),t.jsx(X,{}),t.jsx(d,{}),t.jsx(Y,{}),t.jsx(d,{})]})}export{_t as default};
