"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[940],{81021:function(e,t,s){s.d(t,{Z:function(){return a}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let a=(0,s(60998).Z)("PinOff",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]])},24544:function(e,t,s){s.d(t,{Z:function(){return a}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let a=(0,s(60998).Z)("Pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]])},65134:function(e,t,s){s.d(t,{Z:function(){return a}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let a=(0,s(60998).Z)("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},47603:function(e,t,s){s.d(t,{Z:function(){return a}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let a=(0,s(60998).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},96122:function(e,t,s){s.d(t,{Z:function(){return a}});/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let a=(0,s(60998).Z)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},1125:function(e,t,s){s.d(t,{C:function(){return i}});var a=s(85893),n=s(67294),r=s(34209),l=s(84283);let c=e=>{if(!e||"string"!=typeof e)return e;let t=e.split("\n"),s=[];for(let e=0;e<t.length;e++){let a=t[e];if(""===a.trim()){let n=!1,r=0;for(let s=e-1;s>=0;s--){let e=t[s],a=e.trim();if(a&&e.match(/:\s*[|>]\s*$/)){n=!0;for(let e=s+1;e<t.length;e++){let s=t[e];if(s.trim()){r=s.search(/\S/);break}}break}if(a&&0===e.search(/\S/))break}if(n)for(let n=e+1;n<t.length;n++){let e=t[n];if(e.trim()){e.search(/\S/)>=r?s.push("  #YAML_BLANK_LINE_MARKER#"):s.push(a);break}}else s.push(a)}else s.push(a)}return s.join("\n")};function i(e){let{children:t,className:s=""}=e,i=(0,n.useRef)(null),o=c(t);(0,n.useEffect)(()=>{if(i.current){let e=i.current;setTimeout(()=>{let t;let s=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);for(;t=s.nextNode();)t.textContent&&t.textContent.includes("#YAML_BLANK_LINE_MARKER#")&&(t.textContent=t.textContent.replace(/#YAML_BLANK_LINE_MARKER#/g,""))},0)}},[o]);let d={...l.mQ,'code[class*="language-"]':{...l.mQ['code[class*="language-"]'],whiteSpace:"pre !important"},'pre[class*="language-"]':{...l.mQ['pre[class*="language-"]'],whiteSpace:"pre !important"}};return(0,a.jsx)("div",{ref:i,className:s,children:(0,a.jsx)(r.Z,{language:"yaml",style:d,customStyle:{margin:0,padding:0,background:"transparent",fontSize:"0.875rem",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace'},wrapLines:!0,wrapLongLines:!0,showLineNumbers:!1,useInlineStyles:!0,children:o})})}},50940:function(e,t,s){s.r(t),s.d(t,{RecipeDetail:function(){return R}});var a=s(85893),n=s(67294),r=s(11163),l=s(41664),c=s.n(l),i=s(55739),o=s(1272),d=s(96122),u=s(47603),x=s(60998);/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let p=(0,x.Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var m=s(24544),h=s(70282);/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let y=(0,x.Z)("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);var f=s(81021),b=s(27325),j=s(65134);s(37673);var g=s(30803),v=s(91360),N=s(42557),k=s(29749);s(69123);var w=s(28970);s(62935);var C=s(1125),_=s(15821),L=s(79586),M=s(56072),S=s(470);function Z(e){let{isOpen:t,onClose:s,template:r,onSave:l}=e,[c,u]=(0,n.useState)(""),[x,p]=(0,n.useState)(""),[m,h]=(0,n.useState)(!1),[y,f]=(0,n.useState)(null);(0,n.useEffect)(()=>{r&&t&&(u(r.description||""),p(r.content||""),f(null))},[r,t]);let b=async e=>{e.preventDefault(),h(!0),f(null);try{o.ZP.load(x)}catch(e){f("Invalid YAML: ".concat(e.message)),h(!1);return}try{await l({description:c||null,content:x}),s()}catch(e){f(e.message)}finally{h(!1)}};return r?(0,a.jsx)(v.Vq,{open:t,onOpenChange:s,children:(0,a.jsxs)(v.cZ,{className:"sm:max-w-2xl max-h-[90vh] overflow-y-auto px-8",children:[(0,a.jsxs)(v.fK,{children:[(0,a.jsxs)(v.$N,{className:"text-xl text-gray-900",children:["Edit Recipe: ",r.name]}),(0,a.jsx)(v.Be,{children:"Update your recipe description and content."})]}),(0,a.jsxs)("form",{onSubmit:b,className:"space-y-4 mt-4",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(k._,{htmlFor:"description",children:"Description"}),(0,a.jsx)(N.I,{id:"description",value:c,onChange:e=>u(e.target.value),placeholder:"Optional description...",className:"placeholder:text-gray-500"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(k._,{htmlFor:"content",children:"YAML Content *"}),(0,a.jsx)(w.X,{value:x,onChange:e=>{p(e),f(null)},maxHeight:"400px"})]}),y&&(0,a.jsxs)("div",{className:"rounded-md border border-red-200 bg-red-50 p-3 flex items-start gap-2",children:[(0,a.jsx)(d.Z,{className:"w-4 h-4 text-red-600 mt-0.5 flex-shrink-0"}),(0,a.jsx)("p",{className:"text-sm text-red-800",children:y})]}),(0,a.jsxs)(v.cN,{children:[(0,a.jsx)(g.z,{type:"button",variant:"outline",onClick:s,disabled:m,children:"Cancel"}),(0,a.jsx)(g.z,{type:"submit",disabled:m,className:"bg-sky-600 hover:bg-sky-700 text-white",children:m?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{size:16,className:"mr-2"}),"Saving..."]}):"Save Changes"})]})]})]})}):null}function E(e){let{isOpen:t,onClose:s,template:r,onDelete:l}=e,[c,o]=(0,n.useState)(!1),d=async()=>{o(!0);try{await l(),s()}catch(e){(0,_.C)("Delete failed: ".concat(e.message),"error")}finally{o(!1)}};return r?(0,a.jsx)(v.Vq,{open:t,onOpenChange:s,children:(0,a.jsxs)(v.cZ,{className:"sm:max-w-md",children:[(0,a.jsxs)(v.fK,{children:[(0,a.jsx)(v.$N,{className:"text-xl text-red-600",children:"Delete Recipe"}),(0,a.jsxs)(v.Be,{children:['Are you sure you want to delete "',r.name,'"? This action cannot be undone.']})]}),(0,a.jsxs)(v.cN,{className:"mt-4",children:[(0,a.jsx)(g.z,{variant:"outline",onClick:s,disabled:c,children:"Cancel"}),(0,a.jsx)(g.z,{onClick:d,disabled:c,className:"bg-red-600 hover:bg-red-700 text-white",children:c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Z,{size:16,className:"mr-2"}),"Deleting..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Z,{className:"w-4 h-4 mr-2"}),"Delete"]})})]})]})}):null}function R(){let e=(0,r.useRouter)(),{recipe:t}=e.query,[s,l]=(0,n.useState)(null),[o,d]=(0,n.useState)(!0),[x,v]=(0,n.useState)(null),[N,k]=(0,n.useState)(!1),[w,R]=(0,n.useState)(!1),[O,A]=(0,n.useState)(!1),[z,U]=(0,n.useState)(!1),[D,T]=(0,n.useState)(!1),F=(0,n.useCallback)(async()=>{if(!e.isReady||!t)return;let s=t||null;if(!s){v("Invalid template URL"),d(!1);return}d(!0),v(null);try{let e=await (0,L.G3)(s);e?l(e):v("Recipe not found")}catch(e){v(e.message||"Failed to load recipe")}finally{d(!1)}},[e.isReady,t]);(0,n.useEffect)(()=>{F()},[F]);let V=async e=>{let t=await (0,L.DI)(s.name,e);if(t)l(t),(0,_.C)("Recipe updated successfully!","success");else throw Error("Failed to update recipe")},I=async()=>{if(await (0,L.eI)(s.name))(0,_.C)("Recipe deleted successfully!","success"),e.push("/recipes");else throw Error("Failed to delete recipe")},q=async()=>{try{let e=await (0,L.Uu)(s.name,!s.pinned);e&&(l(e),(0,_.C)(e.pinned?"Recipe pinned!":"Recipe unpinned!","success"))}catch(e){(0,_.C)("Recipe pin operation failed: ".concat(e.message),"error")}},B=async(e,t,s)=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),t.remove()}s(!0),(0,_.C)(t,"success"),setTimeout(()=>s(!1),2e3)}catch(e){(0,_.C)("Failed to copy to clipboard","error")}};if(o)return(0,a.jsxs)("div",{className:"flex justify-center items-center h-64",children:[(0,a.jsx)(i.Z,{size:20,className:"mr-2"}),(0,a.jsx)("span",{className:"text-gray-500",children:"Loading..."})]});if(x)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center h-64",children:[(0,a.jsx)("div",{className:"text-red-500 mb-4",children:x}),(0,a.jsx)(c(),{href:"/recipes",children:(0,a.jsxs)(g.z,{variant:"outline",children:[(0,a.jsx)(p,{className:"w-4 h-4 mr-2"}),"Back to Hub"]})})]});if(!s)return null;let P=(0,M.NL)(s.recipe_type),Y=P.icon;return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsxs)(c(),{href:"/recipes",className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,a.jsx)(p,{className:"h-4 w-4 mr-1.5"}),(0,a.jsx)("span",{children:"Back"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(Y,{className:"w-5 h-5 ".concat("sky"===P.color?"text-sky-600":"purple"===P.color?"text-purple-600":"green"===P.color?"text-green-600":"orange"===P.color?"text-orange-600":"text-gray-600")}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h1",{className:"text-base text-sky-blue leading-none",children:s.name}),s.pinned&&(0,a.jsx)(m.Z,{className:"w-4 h-4 text-amber-500"})]}),(0,a.jsx)("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:(0,a.jsx)("span",{children:P.fullLabel})})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsxs)("button",{onClick:()=>{B(window.location.href,"Link copied to clipboard!",k)},className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[N?(0,a.jsx)(h.Z,{className:"h-4 w-4 mr-1.5 text-green-600"}):(0,a.jsx)(y,{className:"h-4 w-4 mr-1.5"}),(0,a.jsx)("span",{children:N?"Copied!":"Share"})]}),(0,a.jsx)("button",{onClick:!1!==s.is_pinnable?q:void 0,className:"flex items-center ".concat(!1===s.is_pinnable?"text-gray-400 cursor-not-allowed":"text-sky-blue hover:text-sky-blue-bright"),title:!1===s.is_pinnable?"Default recipes cannot be pinned/unpinned":"",disabled:!1===s.is_pinnable,children:s.pinned?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.Z,{className:"h-4 w-4 mr-1.5"}),(0,a.jsx)("span",{children:"Unpin"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.Z,{className:"h-4 w-4 mr-1.5"}),(0,a.jsx)("span",{children:"Pin"})]})}),(0,a.jsxs)("button",{onClick:()=>{let t={name:"".concat(s.name,"-copied"),description:s.description,content:s.content,recipe_type:s.recipe_type};e.push({pathname:"/recipes",query:{copy:JSON.stringify(t)}})},className:"text-sky-blue hover:text-sky-blue-bright flex items-center",children:[(0,a.jsx)(b.Z,{className:"h-4 w-4 mr-1.5"}),(0,a.jsx)("span",{children:"Copy to New"})]}),(0,a.jsxs)("button",{onClick:!1!==s.is_editable?()=>U(!0):void 0,className:"flex items-center ".concat(!1===s.is_editable?"text-gray-400 cursor-not-allowed":"text-sky-blue hover:text-sky-blue-bright"),title:!1===s.is_editable?"Default recipes cannot be edited":"",disabled:!1===s.is_editable,children:[(0,a.jsx)(j.Z,{className:"h-4 w-4 mr-1.5"}),(0,a.jsx)("span",{children:"Edit"})]}),(0,a.jsxs)("button",{onClick:!1!==s.is_editable?()=>T(!0):void 0,className:"flex items-center ".concat(!1===s.is_editable?"text-gray-400 cursor-not-allowed":"text-red-600 hover:text-red-700"),title:!1===s.is_editable?"Default recipes cannot be deleted":"",disabled:!1===s.is_editable,children:[(0,a.jsx)(u.Z,{className:"h-4 w-4 mr-1.5"}),(0,a.jsx)("span",{children:"Delete"})]})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border bg-card text-card-foreground shadow-sm",children:[(0,a.jsx)("div",{className:"flex items-center justify-between px-4 pt-4",children:(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Details"})}),(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Name"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.name})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Type"}),(0,a.jsx)("div",{className:"text-base mt-1",children:P.fullLabel})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Authored by"}),(0,a.jsx)("div",{className:"text-base mt-1",children:s.user_name||s.user_id||"Unknown"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Updated"}),(0,a.jsxs)("div",{className:"text-base mt-1",children:[(0,a.jsx)(S.Zg,{date:s.updated_at?new Date(1e3*s.updated_at):null})," ","by ",s.updated_by_name||s.user_name||"Unknown"]})]})]}),s.description&&(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base mb-1",children:"Description"}),(0,a.jsx)("p",{className:"text-base text-gray-700",children:s.description})]}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"Launch Command"}),(0,a.jsx)("button",{onClick:()=>{s&&B((0,M.UU)(s.recipe_type,s.name),"Command copied to clipboard!",R)},className:"flex items-center text-gray-500 hover:text-gray-700 transition-colors duration-200 p-1 ml-2",title:w?"Copied!":"Copy command",children:w?(0,a.jsx)(h.Z,{className:"w-4 h-4 text-green-600"}):(0,a.jsx)(b.Z,{className:"w-4 h-4"})})]}),(0,a.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3 mt-2",children:(0,a.jsx)("code",{className:"text-sm text-gray-800 font-mono break-all",children:(0,M.UU)(s.recipe_type,s.name)})})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"text-gray-600 font-medium text-base",children:"YAML Content"}),(0,a.jsx)("button",{onClick:()=>{s&&B(s.content,"YAML copied to clipboard!",A)},className:"flex items-center text-gray-500 hover:text-gray-700 transition-colors duration-200 p-1 ml-2",title:O?"Copied!":"Copy YAML",children:O?(0,a.jsx)(h.Z,{className:"w-4 h-4 text-green-600"}):(0,a.jsx)(b.Z,{className:"w-4 h-4"})})]}),(0,a.jsx)("div",{className:"bg-gray-50 border border-gray-200 rounded-md p-3 max-h-96 overflow-y-auto mt-2",children:(0,a.jsx)(C.C,{className:"whitespace-pre-wrap",children:s.content})})]})]})]}),(0,a.jsx)(Z,{isOpen:z,onClose:()=>U(!1),template:s,onSave:V}),(0,a.jsx)(E,{isOpen:D,onClose:()=>T(!1),template:s,onDelete:I})]})}},79586:function(e,t,s){s.d(t,{DI:function(){return c},G3:function(){return r},Uu:function(){return o},eI:function(){return i},iM:function(){return n},kW:function(){return l}});var a=s(47145);async function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let t={pinned_only:e.pinnedOnly||!1,my_recipes_only:e.myRecipesOnly||!1,recipe_type:e.recipeType||null};return await a.x.fetch("/recipes/list",t,"POST")||[]}catch(e){throw console.error("Error fetching YAML templates:",e),e}}async function r(e){try{return await a.x.fetch("/recipes/get",{recipe_name:e})}catch(e){throw console.error("Error fetching Recipe:",e),e}}async function l(e){try{return await a.x.fetch("/recipes/create",{name:e.name,content:e.content,recipe_type:e.recipeType,description:e.description||null,owner_name:e.ownerName||null})}catch(e){throw console.error("Error creating Recipe:",e),e}}async function c(e,t){try{return await a.x.fetch("/recipes/update",{recipe_name:e,description:t.description,content:t.content})}catch(e){throw console.error("Error updating Recipe:",e),e}}async function i(e){try{return await a.x.fetch("/recipes/delete",{recipe_name:e})}catch(e){throw console.error("Error deleting Recipe:",e),e}}async function o(e,t){try{return await a.x.fetch("/recipes/pin",{recipe_name:e,pinned:t})}catch(e){throw console.error("Error toggling Recipe pin status:",e),e}}},56072:function(e,t,s){s.d(t,{Ft:function(){return o},nT:function(){return i},UU:function(){return x},NL:function(){return u}});var a=s(60998);/**
 * @license lucide-react v0.407.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let n=(0,a.Z)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),r=(0,a.Z)("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]),l=(0,a.Z)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),c=(0,a.Z)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]),i=Object.freeze({CLUSTER:"cluster",JOB:"job",POOL:"pool",VOLUME:"volume"}),o=Object.freeze(Object.values(i)),d={sky:"text-sky-600",purple:"text-purple-600",green:"text-green-600",orange:"text-orange-600",gray:"text-gray-600"};function u(e){let t;switch(e){case i.CLUSTER:t={icon:n,color:"sky",label:"Cluster",fullLabel:"Cluster"};break;case i.JOB:t={icon:r,color:"purple",label:"Job",fullLabel:"Managed Job"};break;case i.VOLUME:t={icon:l,color:"green",label:"Volume",fullLabel:"Volume"};break;case i.POOL:t={icon:c,color:"orange",label:"Pool",fullLabel:"Job Pool"};break;default:throw Error("Invalid recipe type: ".concat(e))}return t.colorClass=d[t.color]||"text-gray-600",t}function x(e,t){switch(e){case i.CLUSTER:return"sky launch recipes:".concat(t);case i.JOB:return"sky jobs launch recipes:".concat(t);case i.VOLUME:return"sky volumes apply recipes:".concat(t);case i.POOL:return"sky jobs pool apply recipes:".concat(t);default:throw Error("Invalid recipe type: ".concat(e))}}}}]);