import{Dd as a}from"./shared-0-C4kdVF7Y.js";import{ki as r}from"./vendor-frame-CwiylG4Y.js";import{nn as e}from"./vendor-all-2-BJdkbLSj.js";import{V as s,dl as t}from"./shared-5-UQAFGbWu.js";import{i as o}from"./shared-12-kUZ_jZyi.js";import{a as i,c as n,i as d,n as c,o as m,r as l,s as h,t as j}from"./c5a2ad2ba-h2VYAi4u.js";import{i as f,n as u,r as b,t as g}from"./ca36ac79f-D4Ps7FtN.js";var x=r();function p(){const r=o(),p=a(),v=j("chat",{relTabs:!0});return s("artifacts_load",!r||v.chatHardError?"failed":v.isLoading?"pending":"ready"),r?(0,x.jsx)(d,{title:(0,x.jsx)(e,{defaultMessage:"Artifacts",id:"eW5eoWkxy3"}),actions:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(c,{value:v.sourceFilter,onChange:v.setSourceFilter,enabledSources:v.enabledSources}),(0,x.jsx)(n,{surface:p?void 0:"chat"})]}),search:(0,x.jsx)(h,{}),afterSearch:(0,x.jsx)(g,{value:v.relTab,onChange:v.setRelTab,enabled:v.sharedTabEnabled}),searchQuery:v.searchQuery,filterActive:v.filterActive,items:v.items,isLoading:v.isLoading,isAugmenting:v.isAugmenting,showSourceBadges:v.showSourceBadges,emptyState:(0,x.jsx)(u,{}),tabEmptyState:v.sharedTabEnabled&&"all"===v.sourceFilter?"mine"===v.relTab?v.mineTabFrameError?(0,x.jsx)(m,{}):(0,x.jsx)(f,{}):"shared"===v.relTab?v.sharedTabFrameError?(0,x.jsx)(m,{}):(0,x.jsx)(b,{}):void 0:void 0,ddActionName:"artifact-item",capNotice:v.frameCapped?(0,x.jsx)(l,{}):void 0,banner:!v.hasSourceError||v.isLoading||v.sharedTabFrameError||v.mineTabFrameError||v.chatHardError&&0===v.items.length&&!v.searchQuery&&!v.filterActive?void 0:(0,x.jsx)(i,{}),errorState:v.chatHardError&&0===v.items.length?(0,x.jsx)(m,{}):void 0,hasMore:v.hasMore,isFetching:v.isFetching,onLoadMore:v.loadMore}):(0,x.jsx)(t,{})}function v(){return(0,x.jsx)(p,{})}export{v as ArtifactsMyRoute};