"use strict";(self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[4066],{74437:(e,s,t)=>{t.r(s),t.d(s,{default:()=>I});var n=t(77810),a=t(76872),r=t(55339),i=t(1335),u=t(14371),l=t(33629),c=t(52797),o=t(57602),d=t(34021),p=t(29970),h=t(62908),j=t(19757),x=t(52142),f=t(95910),m=t(72737),g=t(55500),N=t(21003),w=t(92611);const C={en:JSON.parse('{"action_open-queries-page":"Open Queries page"}')},k=(0,w.Kc)("yt:query-tracker.open-button",C);var v=t(64922);function y(e){var s,t,n=e.className,a=e.cluster,r=e.path,c=(0,u.d)(p.Vi),o=(0,u.d)(p.BH),d=null===(s=(0,u.d)(p.Z1))||void 0===s?void 0:s.id,h="";return d&&!o?(h=(0,N.C)(a,d),t="action"):(h=(0,N.S)(a,c,{path:r,useDraft:!0}),t="outlined"),(0,v.jsx)(g.A,{routed:!0,url:h,children:(0,v.jsx)(i.$,{className:n,view:t,size:"l",title:k("action_open-queries-page"),children:(0,v.jsx)(l.A,{awesome:"external-link",size:16})})})}var b=t(12094),q=t(14855),A=(0,a.A)("query-tracker-meta-form");function _(e){var s=e.onClickOnNewQueryButton,t=e.className,a=e.cluster,i=e.path,l=(0,u.w)(),c=(0,u.d)(p.qR),o=(0,u.d)(p.Vi),d=(0,n.useCallback)((function(e){return l((0,x.Bn)({settings:e}))}),[l]);return(0,v.jsxs)(r.s,{className:A(null,t),gap:3,justifyContent:"space-between",grow:1,children:[(0,v.jsxs)(r.s,{gap:3,children:[(0,v.jsx)(q.s,{className:A("cluster")}),(0,v.jsx)(m.u,{className:A("engine"),tableCluster:a,tablePath:i}),(0,v.jsx)(b.y,{})]}),(0,v.jsxs)(r.s,{gap:3,children:[(0,v.jsx)(h.g,{popupClassName:A("settings"),settings:c.settings,engine:o,onChange:d}),(0,v.jsx)(j.y1,{popupClassName:A("files")}),(0,v.jsx)(f.f,{onClick:s,hideText:!0}),(0,v.jsx)(y,{cluster:a,path:i})]})]})}var z=t(35788),B=t(61525),O=t(30996),Q=(0,a.A)("query-widget");function I(e){var s=e.onClose,t=(0,u.w)(),a=(0,u.d)(c.Nu),p=(0,u.d)(o.k4),h=(0,n.useRef)(p);return(0,n.useEffect)((function(){t((0,B.N)())}),[t,a]),(0,v.jsx)("div",{className:Q(),children:(0,v.jsxs)(z.Z,{children:[(0,v.jsxs)(r.s,{alignItems:"center",justifyContent:"space-between",className:Q("header"),children:[(0,v.jsx)(_,{onClickOnNewQueryButton:function(){t((0,x.I2)(O.d.YQL,a,h.current))},className:Q("meta-form"),cluster:a,path:h.current}),(0,v.jsx)(i.$,{view:"flat",className:Q("control"),onClick:s,size:"l",children:(0,v.jsx)(l.A,{awesome:"times",size:16})})]}),(0,v.jsx)(d.w,{pathNavigation:!1,hideAco:!0})]})})}}}]);
//# sourceMappingURL=query-widget.7d970e6f.chunk.js.map