"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[371],{40371:function(e,n,i){i.r(n),i.d(n,{GuessJobLocationRoot:function(){return v}});var t=i(52322),s=i(14934),o=i(37483),r=i(49308),l=i(74580),c=i(35292),d=i(16629),a=i(1747),h=i(7267),j=i(47933),x=i(100),p=i(65822),u=i(42031),b=i(10539),f=i(69737),m=i(36381),g=i(59923);let v=()=>{(0,f.Px)();let{jobPath:e}=(0,h.UO)(),n=(0,h.$B)("/guess/(/?.*)"),i=(0,h.TH)(),v=n.params[0],{search:J}=i,{pipelineName:w}=(0,m.p3)(e),{loading:y,options:k}=(0,x.vl)();if(y)return(0,t.jsx)(g.T,{purpose:"page"});let E=(0,u.k)(k,w);if(0===E.length)return(0,t.jsx)(s.x,{padding:{vertical:64},children:(0,t.jsx)(o.t,{icon:"no-results",title:"No matching jobs",description:(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{children:(0,t.jsx)("strong",{children:w})}),"was not found in any of your definitions."]})})});if(1===E.length){let e=E[0],n=(0,x.Zj)(e),i=(0,x.E8)(e,w),s=(0,b.$U)(n,"/".concat(i?"jobs":"pipelines","/").concat(v).concat(J));return(0,t.jsx)(h.l_,{to:s})}let _=E.some(e=>!(0,x.E8)(e,w));return(0,t.jsxs)(r.T,{children:[(0,t.jsx)(l.m,{title:(0,t.jsx)(c.X6,{children:w}),icon:"job",description:_?"Job / pipeline in multiple code locations":"Job in multiple code locations"}),(0,t.jsx)(s.x,{padding:{vertical:16,horizontal:24},children:(0,t.jsx)(d.b,{intent:"info",title:(0,t.jsx)("div",{children:_?(0,t.jsxs)(t.Fragment,{children:["Jobs or pipelines named ",(0,t.jsx)("strong",{children:w})," were found in multiple code locations."]}):(0,t.jsxs)(t.Fragment,{children:["Jobs named ",(0,t.jsx)("strong",{children:w})," were found in multiple code locations."]})})})}),(0,t.jsxs)(a.i,{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:"Code location"}),(0,t.jsx)("th",{children:_?"Job / Pipeline":"Job"})]})}),(0,t.jsx)("tbody",{children:E.map(e=>{let{repository:{name:n},repositoryLocation:{name:i}}=e,s=(0,p.At)(n,i);return(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{style:{width:"40%"},children:s}),(0,t.jsx)("td",{children:(0,t.jsx)(j.rU,{to:(0,b.rO)(n,i,"/".concat((0,x.E8)(e,w)?"jobs":"pipelines","/").concat(w)),children:w})})]},s)})})]})]})};n.default=v}}]);
//# sourceMappingURL=371.4b705f8fabdfe671.js.map