import{j as o}from"./cm-1.0.63-CSIRHMXC.js";import{y as f}from"./index-1.0.63-oIDff4nA.js";import{a as j}from"./hooks-1.0.63-CWs3kTdT.js";import{l as g,bO as d}from"./lib-1.0.63-DJZPtMem.js";import{u as v}from"./ExplorerActionAdmin-1.0.63-Crwt4B9D.js";import{N as w}from"./react-number-format.es-1.0.63-B-GknBUR.js";import{A as k,a as P}from"./AccordionSummary-1.0.63-CweQ2Hjy.js";import{A as T}from"./AccordionDetails-1.0.63-nbUPBP1V.js";import{F as u,a,b as _,T as F}from"./TextField-1.0.63-C35Mfi1Q.js";import{R as y}from"./RadioGroup-1.0.63-DNdHdAIV.js";import{R as x}from"./Radio-1.0.63-CTxGi4al.js";import{F as A}from"./FormControlLabel-1.0.63-DpYUdUm6.js";import{S as C}from"./Switch-1.0.63-m0NqOO9s.js";import"./redux-1.0.63-Df-eBzJn.js";import"./vendor-1.0.63-CN03Eozo.js";import"./Typography-1.0.63-mecuj_Wl.js";import"./ButtonBase-1.0.63-CF10PFMS.js";import"./useEnhancedEffect-1.0.63-DnR0ZFqV.js";import"./ThemeProvider-1.0.63-Cq0KMgkh.js";import"./Modal-1.0.63-fMXTbfks.js";import"./notistack-1.0.63-B49ULGrj.js";import"./iconBase-1.0.63-CFvHhC4t.js";import"./loglevel-1.0.63-BZ7XahX3.js";import"./lodash-1.0.63-hMxolcpJ.js";import"./moment-1.0.63-C5S46NFB.js";import"./cmJson-1.0.63-CyZ2MfFg.js";import"./rehyperaw-1.0.63-AkovKNCK.js";import"./markdown-1.0.63-BJvkzZkj.js";import"./settings-1.0.63-Dh5mJf1z.js";import"./Link-1.0.63-wURABoab.js";import"./TabPanel-1.0.63-CSMGfwNU.js";import"./InputAdornment-1.0.63-q8tTbJxw.js";import"./cjs-1.0.63-4A2xol4v.js";import"./getThemeProps-1.0.63-5ZzcWe3G.js";import"./Select-1.0.63-BMejr8a7.js";import"./Menu-1.0.63-DLh4HkF0.js";import"./createSvgIcon-1.0.63-DWL3J-DK.js";import"./ConfirmDialog-1.0.63-eXgm3P8b.js";import"./AdminTheme-1.0.63-DhJ0rrw5.js";import"./DialogContent-1.0.63-B3W-DlSe.js";import"./Spinner-1.0.63-zcgIyS7Z.js";import"./CardHeader-1.0.63-nt62E5SM.js";import"./MenuItem-1.0.63-Bvb3IjMP.js";import"./Tooltip-1.0.63-BIjHl44M.js";import"./ActionsExplorer-1.0.63-DQojhfpy.js";import"./RestApi-1.0.63-BUfzocgq.js";import"./index-1.0.63-BbQj9wqD.js";import"./ActionsDml-1.0.63-nhbCczlS.js";import"./ExplorerActionEnum-1.0.63-eclZgKpy.js";import"./useUiExplorerAction-1.0.63-dQBhpWd7.js";import"./Collapse-1.0.63-B-Rwe0o9.js";import"./SwitchBase-1.0.63-Br-lbcZ1.js";const At=({dbs:h,tbl:b,setIsUpdated:n})=>{var l,c;g.debug(h,b);const p=j(),t=v(),m=i=>{const r={...t,table_settings:{...t.table_settings,hyperlink_definition:i}};p(d({settings:r})),n(!0)},s=(i,r)=>{console.log(i,r);const e={...t,table_settings:{...t.table_settings,row_count_estimate_value:i,row_count_estimate_value_hard:r}};p(d({settings:e})),n(!0)};return o.jsxs(k,{disableGutters:!0,children:[o.jsx(P,{expandIcon:o.jsx(f,{}),children:"Table Settings"}),o.jsxs(T,{children:[o.jsxs(u,{children:[o.jsx(a,{children:"Process hyperlink columns as"}),o.jsxs(y,{sx:{marginTop:"10px",marginBottom:"10px"},children:[o.jsxs(a,{className:"align-label-radio",children:[o.jsx(x,{checked:t.table_settings.hyperlink_definition==="json",onChange:i=>{m("json"),i.stopPropagation()}}),"Preformatted JSON"]}),o.jsxs(a,{children:[o.jsx(x,{checked:t.table_settings.hyperlink_definition==="text",onChange:i=>{m("text"),i.stopPropagation()}}),"Plain text"]})]}),o.jsx(_,{children:"Preformatted JSON supports individual label and target settings. Plain text converts column content to a hyperlink link."})]}),o.jsxs(u,{fullWidth:!0,sx:{marginTop:"30px"},children:[o.jsx(A,{control:o.jsx(C,{checked:((l=t==null?void 0:t.table_settings)==null?void 0:l.row_count_estimate_value)==="hard",onChange:(i,r)=>{var e;s(r?"hard":"plugin",(e=t==null?void 0:t.table_settings)==null?void 0:e.row_count_estimate_value_hard),i.stopPropagation()}}),label:"Use hard row count estimate"}),o.jsx(w,{fullWidth:!0,customInput:F,label:"Hard row count estimate",value:(c=t==null?void 0:t.table_settings)==null?void 0:c.row_count_estimate_value_hard,onValueChange:({value:i})=>{var r,e;i===""?s((r=t==null?void 0:t.table_settings)==null?void 0:r.row_count_estimate_value,""):s((e=t==null?void 0:t.table_settings)==null?void 0:e.row_count_estimate_value,i)},decimalScale:0,variant:"outlined",onInvalid:i=>{i.preventDefault()},sx:{marginTop:"20px"}}),o.jsx(_,{children:"Skips DBMS row count estimatation. Needs to be enabled per app in the Table Builder section Performance."})]})]})]})};export{At as default};
