import{j as e}from"./tanstack-1.0.74-aU0azVkW.js";import{B as h}from"./index-1.0.74-DxwH6OqZ.js";import{u as C,a as D}from"./hooks-1.0.74-NYCTWeI9.js";import{l as A,cr as u}from"./lib-1.0.74-B5IEqfHg.js";import{r as F}from"./redux-1.0.74-D8bIc6ki.js";import{u as L}from"./ExplorerActionAdmin-1.0.74-lT6ElkTS.js";import{A as j,a as b}from"./AccordionSummary-1.0.74-BIcO1H0G.js";import{A as f}from"./AccordionDetails-1.0.74-UIik1H9G.js";import{F as v,T as M,I as E,b as P}from"./TextField-1.0.74-BW9Byijb.js";import{B as _}from"./Box-1.0.74-DEbuVvGV.js";import{S as T}from"./Select-1.0.74-DHOnlEEH.js";import{M as i}from"./MenuItem-1.0.74-D9LDbFUb.js";import"./vendor-1.0.74-CN03Eozo.js";import"./CircularProgress-1.0.74-QfwfRJ7i.js";import"./ButtonBase-1.0.74-W6tAH7AI.js";import"./Typography-1.0.74-B4mhsevh.js";import"./useEnhancedEffect-1.0.74-B56M26dS.js";import"./ThemeProvider-1.0.74-4uzbYYLM.js";import"./Portal-1.0.74-BrUPeMX9.js";import"./utils-1.0.74-7xWhx9mc.js";import"./iconBase-1.0.74-Cs0vntJu.js";import"./RestApiError-1.0.74-Bb1un17k.js";import"./settings-1.0.74-BnRB9SOY.js";import"./Link-1.0.74-Cr-Ob-AP.js";import"./index-1.0.74-CCIRxPEn.js";import"./index-1.0.74-DtMr5-xA.js";import"./ConfirmDialog-1.0.74-CXu4CqK2.js";import"./AdminTheme-1.0.74-BtTaJUu_.js";import"./Modal-1.0.74-BfLid1bk.js";import"./Menu-1.0.74-CdjCBJ4R.js";import"./isHostComponent-1.0.74-DVu5iVWx.js";import"./CardHeader-1.0.74-CHbhRPw-.js";import"./InputAdornment-1.0.74-DzikPcDx.js";import"./CardActions-1.0.74-DRn8SDKF.js";import"./Tooltip-1.0.74-Bsfqgjy3.js";import"./Spinner-1.0.74-B63QTBL9.js";import"./ActionsExplorer-1.0.74-BKccLQP2.js";import"./RestApi-1.0.74-5XKxNzpR.js";import"./index-1.0.74-C9JunOsO.js";import"./ActionsDml-1.0.74-C175Bq0Y.js";import"./TabPanel-1.0.74-BfVdq8Gf.js";import"./useThemeProps-1.0.74-eOKEtzB-.js";import"./getThemeProps-1.0.74-DOfDN6_V.js";import"./ExplorerActionEnum-1.0.74-eclZgKpy.js";import"./useUiExplorerAction-1.0.74-DYJzUzf9.js";import"./Collapse-1.0.74-DA2Rx31o.js";import"./createSvgIcon-1.0.74-Cw_ZFbxi.js";const B=()=>{const s=C(m=>m.manager.metaData);return A.debug("managerMetaData",s),s},De=({dbs:s,tbl:m,setIsUpdated:l})=>{var g;A.debug(s,m);const p=D(),r=L(),d=B(),[c,x]=F.useState(""),y=(o,a)=>{const t={...r,list_labels:{...r.list_labels,[o]:a}};p(u({settings:t})),l(!0)},I=(o,a)=>{const t={...r,form_labels:{...r.form_labels,[o]:a}};p(u({settings:t})),l(!0)},S=(o,a)=>{const t={...r,column_media:{...r.column_media,[o]:a}};p(u({settings:t})),l(!0)};return e.jsxs(j,{disableGutters:!0,slotProps:{transition:{unmountOnExit:!0}},children:[e.jsx(b,{expandIcon:e.jsx(h,{}),children:"Column Settings"}),e.jsx(f,{children:e.jsxs(v,{fullWidth:!0,children:[e.jsx(_,{sx:{display:"grid",gridGap:"10px",marginBottom:"20px"},children:e.jsxs(_,{children:[...(g=d==null?void 0:d.columns)==null?void 0:g.map((o,a)=>{const t=o.column_name;return e.jsxs(j,{expanded:c===t,onChange:()=>{x(c===t?"":t)},sx:{"&.MuiPaper-root.MuiPaper-elevation.Mui-expanded":{margin:0}},children:[e.jsx(b,{expandIcon:e.jsx(h,{}),children:o.column_name}),e.jsxs(f,{sx:{display:"grid",gridGap:"10px"},children:[e.jsx(M,{label:"Table label",value:r.list_labels[t],variant:"outlined",onChange:n=>{y(t,n.target.value)}}),e.jsx(M,{label:"Form label",value:r.form_labels[t],variant:"outlined",onChange:n=>{I(t,n.target.value)}}),e.jsxs(v,{children:[e.jsx(E,{id:"media_type_label"+a,variant:"outlined",children:"Media type"}),e.jsxs(T,{MenuProps:{id:"pp-select-menu"},labelId:"media_type_label"+a,id:"media_type"+a,label:"Media type",value:r.column_media[t]??"",variant:"outlined",onChange:n=>{S(t,n.target.value),n.stopPropagation()},children:[e.jsx(i,{value:"",children:" "},""),e.jsx(i,{value:"Attachment",children:"Attachment"},"Attachment"),e.jsx(i,{value:"Audio",children:"Audio"},"Audio"),e.jsx(i,{value:"Hyperlink",children:"Hyperlink"},"Hyperlink"),e.jsx(i,{value:"Image",children:"Image"},"Image"),e.jsx(i,{value:"ImageURL",children:"ImageURL"},"ImageURL"),e.jsx(i,{value:"Video",children:"Video"},"Video")]})]})]})]})})]})}),e.jsx(P,{children:"Default column labels and column media types"})]})})]})};export{De as default};
