import{j as r}from"./tanstack-1.0.74-aU0azVkW.js";import{r as n}from"./redux-1.0.74-D8bIc6ki.js";import{P as f,b as j,a as h}from"./index-1.0.74-CCIRxPEn.js";import{f as d,af as C,y as g}from"./index-1.0.74-DxwH6OqZ.js";import{a as v}from"./hooks-1.0.74-NYCTWeI9.js";import{j as P}from"./StartQueryBuilder-1.0.74-WVV-m136.js";import"./lib-1.0.74-B5IEqfHg.js";import{P as b}from"./PremiumFeature-1.0.74-BfyB9mrd.js";import{I as l}from"./iconBase-1.0.74-Cs0vntJu.js";import{P as T}from"./Menu-1.0.74-CdjCBJ4R.js";import{C as y,b as A,a as F}from"./CardHeader-1.0.74-CHbhRPw-.js";import{B as x}from"./Box-1.0.74-DEbuVvGV.js";import{T as c,F as B,b as k}from"./TextField-1.0.74-BW9Byijb.js";import{C as z}from"./CardActions-1.0.74-DRn8SDKF.js";import{B as E}from"./ConfirmDialog-1.0.74-CXu4CqK2.js";import"./vendor-1.0.74-CN03Eozo.js";import"./index-1.0.74-DtMr5-xA.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"./index-1.0.74-FmkvObU2.js";import"./useViewHeight-1.0.74-CuK7XWCG.js";import"./RestApiError-1.0.74-Bb1un17k.js";import"./AdminTheme-1.0.74-BtTaJUu_.js";import"./ActionsExplorer-1.0.74-BKccLQP2.js";import"./RestApi-1.0.74-5XKxNzpR.js";import"./DatabaseTypeEnum-1.0.74-DeJfpW1u.js";import"./Spinner-1.0.74-B63QTBL9.js";import"./index-1.0.74-8lphm33F.js";import"./isHostComponent-1.0.74-DVu5iVWx.js";import"./Modal-1.0.74-BfLid1bk.js";import"./Select-1.0.74-DHOnlEEH.js";import"./createSvgIcon-1.0.74-Cw_ZFbxi.js";const ur=({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(d,{title:"Add parameters",children:r.jsx(l,{...j(o),sx:{color:"inherit","&.Mui-disabled":{color:"grey"}},children:r.jsx(C,{})})}),r.jsx(T,{...h(o),anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:r.jsxs(y,{sx:{padding:"4px"},children:[r.jsx(A,{title:"Add Custom Query Parameters",sx:{paddingBottom:"8px"}}),r.jsxs(F,{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(d,{title:"Add parameter",children:r.jsx(l,{onClick:()=>{a.trim()!==""&&e.trim()!==""&&(u(P({queryKey:t,query:{...s.queries[t],params:{...s.queries[t].params,[a]:e}},isUpdated:!0})),m(""),p(""))},disabled:!0,children:r.jsx(g,{})})})]}),r.jsx(B,{children:r.jsx(k,{children:"Enter parameter name and value. Click + to activate."})}),!1,r.jsx(b,{})]}),r.jsx(z,{sx:{justifyContent:"end",padding:"16px"},children:r.jsx(E,{color:"primary",variant:"contained",sx:{width:"90px"},onClick:()=>{o.close()},children:"Done"})})]})})]})})};export{ur as default};
