import{j as r}from"./cm-1.0.63-CSIRHMXC.js";import{r as n}from"./redux-1.0.63-Df-eBzJn.js";import{P as f,b as h,c as j}from"./TabPanel-1.0.63-CSMGfwNU.js";import{e as l,aC as C,x as g}from"./index-1.0.63-oIDff4nA.js";import{a as v}from"./hooks-1.0.63-CWs3kTdT.js";import{u as P}from"./StartQueryBuilder-1.0.63-REjvqyiC.js";import"./lib-1.0.63-DJZPtMem.js";import{P as b}from"./PremiumFeature-1.0.63-CSC9M_X_.js";import{I as d}from"./iconBase-1.0.63-CFvHhC4t.js";import{P as T}from"./Menu-1.0.63-DLh4HkF0.js";import{C as A,b as F,a as y,c as B}from"./CardHeader-1.0.63-nt62E5SM.js";import{B as x}from"./Spinner-1.0.63-zcgIyS7Z.js";import{T as c,F as k,b as z}from"./TextField-1.0.63-C35Mfi1Q.js";import{B as E}from"./cjs-1.0.63-4A2xol4v.js";import"./vendor-1.0.63-CN03Eozo.js";import"./InputAdornment-1.0.63-q8tTbJxw.js";import"./Typography-1.0.63-mecuj_Wl.js";import"./getThemeProps-1.0.63-5ZzcWe3G.js";import"./Select-1.0.63-BMejr8a7.js";import"./ButtonBase-1.0.63-CF10PFMS.js";import"./useEnhancedEffect-1.0.63-DnR0ZFqV.js";import"./Modal-1.0.63-fMXTbfks.js";import"./notistack-1.0.63-B49ULGrj.js";import"./createSvgIcon-1.0.63-DWL3J-DK.js";import"./ThemeProvider-1.0.63-Cq0KMgkh.js";import"./cmJson-1.0.63-CyZ2MfFg.js";import"./rehyperaw-1.0.63-AkovKNCK.js";import"./markdown-1.0.63-BJvkzZkj.js";import"./useViewHeight-1.0.63-C7T4FLFa.js";import"./loglevel-1.0.63-BZ7XahX3.js";import"./lodash-1.0.63-hMxolcpJ.js";import"./moment-1.0.63-C5S46NFB.js";import"./index-1.0.63-Cr9ps5ft.js";import"./AdminTheme-1.0.63-DhJ0rrw5.js";const dr=({queryKey:t,queryBuilderState:s})=>{const u=v(),[a,m]=n.useState(""),[e,p]=n.useState("");return r.jsx(f,{variant:"popover",children:o=>r.jsxs(r.Fragment,{children:[r.jsx(l,{title:"Add parameters",children:r.jsx(d,{...h(o),sx:{color:"inherit","&.Mui-disabled":{color:"grey"}},children:r.jsx(C,{})})}),r.jsx(T,{...j(o),anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:r.jsxs(A,{sx:{padding:"4px"},children:[r.jsx(F,{title:"Add Custom Query Parameters",sx:{paddingBottom:"8px"}}),r.jsxs(y,{children:[r.jsxs(x,{sx:{display:"grid",gridTemplateColumns:"auto auto auto auto",alignItems:"center",gap:"10px"},children:[r.jsx(c,{type:"text",variant:"outlined",label:"Parameter Name",value:a,autoComplete:"off",onChange:i=>{m(i.target.value)},disabled:!0}),r.jsx(x,{sx:{fontSize:"22px"},children:"="}),r.jsx(c,{type:"text",variant:"outlined",label:"Parameter Value",value:e,autoComplete:"off",onChange:i=>{p(i.target.value)},disabled:!0}),r.jsx(l,{title:"Add parameter",children:r.jsx(d,{onClick:()=>{a.trim()!==""&&e.trim()!==""&&(u(P({queryKey:t,query:{...s.queries[t],params:{...s.queries[t].params,[a]:e}}})),m(""),p(""))},disabled:!0,children:r.jsx(g,{})})})]}),r.jsx(k,{children:r.jsx(z,{children:"Enter parameter name and value. Click + to activate."})}),!1,r.jsx(b,{})]}),r.jsx(B,{sx:{justifyContent:"end",padding:"16px"},children:r.jsx(E,{color:"primary",variant:"contained",sx:{width:"90px"},onClick:()=>{o.close()},children:"Done"})})]})})]})})};export{dr as default};
