import { l as head, n as ensure_array_like } from './index-DwaY1cAm.js';
import { g as goto } from './client-BdGHe_hY.js';
import { E as EmptyState, c as clearCache } from './EmptyState-DDFH1K8g.js';
import { I as Icon } from './Icon-CEUrotA6.js';
import './markdown-W_mTBct0.js';
import { o as onDestroy } from './index-server-CrDaL06Y.js';
import { B as Button } from './Button-Cs1aE6ka.js';
import { S as Shimmer } from './Shimmer-DB8W1zt6.js';
import './root-DDSnEAZv.js';
import './index2-CgclKpUj.js';
import './state.svelte-hBbXlUak.js';
import 'dompurify';
import 'marked';

function _page($$renderer, $$props) {
  $$renderer.component(($$renderer2) => {
    let projects = [];
    let loading = false;
    onDestroy(() => {
    });
    async function fetchSessions(append = false, bustCache = false) {
      {
        return;
      }
    }
    async function forceRefresh() {
      loading = true;
      clearCache("shooter_projects");
      await fetchSessions(false, true);
    }
    function navigateToConfig() {
      void goto();
    }
    head("1uha8ag", $$renderer2, ($$renderer3) => {
      $$renderer3.title(($$renderer4) => {
        $$renderer4.push(`<title>Projects - Shooter</title>`);
      });
      $$renderer3.push(`<meta name="description" content="Claude Code sessions across all projects"/>`);
    });
    $$renderer2.push(`<main class="main"><div class="page-header svelte-1uha8ag"><div class="page-header-content svelte-1uha8ag"><div><h1 class="page-title svelte-1uha8ag">Projects</h1> <p class="page-description svelte-1uha8ag">Claude Code sessions across all projects</p></div> <div class="page-actions svelte-1uha8ag">`);
    Button($$renderer2, {
      classes: "btn-secondary",
      onclick: forceRefresh,
      disabled: loading,
      children: ($$renderer3) => {
        Icon($$renderer3, { name: "refresh", size: 14 });
        $$renderer3.push(`<!----> Refresh`);
      },
      $$slots: { default: true }
    });
    $$renderer2.push(`<!----></div></div></div> `);
    {
      $$renderer2.push("<!--[-1-->");
    }
    $$renderer2.push(`<!--]--> `);
    if (loading && projects.length === 0) {
      $$renderer2.push("<!--[0-->");
      $$renderer2.push(`<div class="loading-container"><!--[-->`);
      const each_array = ensure_array_like(Array(5));
      for (let i = 0, $$length = each_array.length; i < $$length; i++) {
        each_array[i];
        Shimmer($$renderer2, { classes: "shimmer-card" });
      }
      $$renderer2.push(`<!--]--></div>`);
    } else {
      $$renderer2.push("<!--[1-->");
      EmptyState($$renderer2, {
        icon: "settings",
        title: "Configuration Required",
        description: "Set up your API credentials to start tracking sessions",
        children: ($$renderer3) => {
          Button($$renderer3, {
            classes: "btn-primary",
            onclick: navigateToConfig,
            text: "Configure Settings"
          });
        }
      });
    }
    $$renderer2.push(`<!--]--></main>`);
  });
}

export { _page as default };
//# sourceMappingURL=_page.svelte-BdYynOck.js.map
