import{j as s,g as u,aq as z,aZ as v,G as g,b8 as w,cG as f,_ as b,dt as F,df as N,dg as m,a2 as C,dh as k,di as y,dn as S,a as D}from"./main-343.js";import{r as L,s as M,S as R,T as $,a as G,C as P,R as T,N as B,b as H,d as O,U,f as W,D as h,M as E,W as _,g as q,h as A,G as V,B as Z,p as J,l as Q,n as X,o as Y,m as K,c as ss,P as es,F as as,q as is,j as ns,k as ts,I as cs,i as rs,H as os,e as ls}from"./bf-468-274.js";import{C as ds}from"./bf-453-86.js";import{D as xs}from"./bf-934-275.js";import{R as js}from"./bf-138-108.js";import{U as ms}from"./bf-785-270.js";function hs({w:a}){return s.jsxs("svg",{className:"btc-line-icn",viewBox:"0 0 172.3 163.8",width:a,children:[s.jsx("path",{className:"line-icn",d:`M146.6,150.5h-118c-11.4,0-20.7-9.3-20.7-20.7V28.7C8,17.3,17.3,8,28.7,8h118c11.4,0,20.7,9.3,20.7,20.7v101.1
          C167.3,141.2,158.1,150.5,146.6,150.5z`}),s.jsx("path",{className:"line-icn",strokeWidth:"12",d:"M31.5,106.2l34-47.6c2.1-3,6.5-3.1,8.8-0.2l31.4,39.5"}),s.jsx("path",{className:"line-icn",strokeWidth:"12",d:"M93.2,86l12.8-15.1c2.1-3,6.5-3.1,8.8-0.2l31.4,39.5"}),s.jsx("path",{className:"line-icn",strokeWidth:"9",d:`M126,38.3L126,38.3c-2.1,0-3.8-1.7-3.8-3.8v0c0-2.1,1.7-3.8,3.8-3.8h0c2.1,0,3.8,1.7,3.8,3.8v0
          C129.8,36.6,128.1,38.3,126,38.3z`})]})}function ps({icn:a,title:n,subTitle:t,fieldKey:e}){const{formType:i,formID:o}=u(),r=z(v),l=g(),c=w(`.${e}-fld-wrp.drag`),p=()=>{r(e),c&&c.classList.remove("drag-hover"),l(`/form/builder/${i}/${o}/field-settings/${e}`)},x=I=>{if(!c)return;const{type:j}=I;j==="mouseenter"?c.classList.add("drag-hover"):j==="mouseleave"&&c.classList.remove("drag-hover")};return s.jsx("button",{type:"button","data-testid":`fld-lst-itm-${a}-${e}`,onClick:p,onMouseEnter:x,onMouseLeave:x,className:"btc-s-l mt-2",children:s.jsxs("div",{className:"flx flx-between ",children:[s.jsxs("div",{className:"flx w-9",children:[s.jsx("span",{className:"lft-icn mr-2 flx br-50",children:typeof a=="string"?Is(a):a}),s.jsxs("div",{className:"w-nwrp o-h",children:[s.jsx("div",{className:"txt-o o-h mb-1",children:f(n)}),t&&s.jsxs("small",{children:[b("Key:"),` ${t}`]})]})]}),s.jsx(F,{size:18})]})})}const Is=a=>({title:s.jsx(L,{w:"14"}),divider:s.jsx(M,{w:"14"}),spacer:s.jsx(R,{size:"17"}),image:s.jsx(hs,{w:"14"}),text:s.jsx($,{size:"14"}),username:s.jsx(ms,{size:"14"}),textarea:s.jsx(G,{size:"14"}),check:s.jsx(P,{w:"14"}),radio:s.jsx(T,{size:"14"}),number:s.jsx(B,{w:"14"}),"html-select":s.jsx(ds,{size:"14"}),select:s.jsx(H,{w:"14"}),password:s.jsx(O,{size:"14"}),email:s.jsx(N,{size:"14"}),url:s.jsx(U,{w:"14"}),"file-up":s.jsx(m,{w:"14"}),date:s.jsx(xs,{w:"14"}),time:s.jsx(W,{size:"14"}),"datetime-local":s.jsx(h,{w:"14"}),month:s.jsx(E,{w:"14"}),week:s.jsx(_,{size:"14"}),color:s.jsx(q,{w:"14"}),recaptcha:s.jsx(js,{size:"14"}),"decision-box":s.jsx(A,{size:"14"}),gdpr:s.jsx(V,{size:"14"}),button:s.jsx(Z,{size:"14"}),html:s.jsx(C,{size:"14"}),shortcode:s.jsx(J,{size:"14"}),paypal:s.jsx(Q,{w:"14"}),stripe:s.jsx(X,{size:"18"}),mollie:s.jsx(Y,{size:"18"}),razorpay:s.jsx(K,{w:"14",h:"19"}),"advanced-file-up":s.jsx(m,{w:"14"}),currency:s.jsx(ss,{size:"15"}),"phone-number":s.jsx(es,{size:"15"}),country:s.jsx(as,{size:"14"}),section:s.jsx(is,{size:"14"}),repeater:s.jsx(ns,{size:"14"}),rating:s.jsx(k,{size:"18"}),signature:s.jsx(ts,{size:"18"}),"image-select":s.jsx(cs,{size:"16"}),turnstile:s.jsx(rs,{size:"16"}),hcaptcha:s.jsx(os,{size:"16"}),range:s.jsx(ls,{size:"16"}),hidden:s.jsx(y,{size:"15"}),"advanced-datetime":s.jsx(h,{w:"14"})})[a];function d(){const a=S(),n=Object.entries(a).filter(([,e])=>{var i;return(i=e==null?void 0:e.valid)==null?void 0:i.hide}),t=Object.entries(a).filter(([,e])=>{var i;return!((i=e==null?void 0:e.valid)!=null&&i.hide)});return s.jsxs(s.Fragment,{children:[s.jsx(d.Group,{title:`Hidden Fields (${n.length})`,filteredFields:n}),s.jsx(d.Group,{title:`Fields (${t.length})`,filteredFields:t})]})}const us=({title:a,filteredFields:n})=>{const{css:t}=D();return n.length?s.jsxs("div",{children:[s.jsx("div",{className:t(zs.title),children:a}),n.map(([e,i])=>{let{lbl:o}=i;const{typ:r,adminLbl:l,txt:c}=i;return["decision-box","gdpr"].includes(r)?o=l:r==="button"&&(o=c),s.jsx(ps,{fieldKey:e,icn:r,title:o||l||r,subTitle:e},e)})]}):s.jsx(s.Fragment,{children:" "})};d.Group=us;const zs={title:{fw:500,fs:16,mx:8,pn:"sticky",pt:14,tp:0,bd:"var(--white)",h:40}};export{d as default};
