"use client";
'use strict';

const jsxRuntime = require('react/jsx-runtime');
const LucideIcons = require('lucide-react');
const card = require('../../../../../../../ui/src/components/card.cjs');
const context = require('@btst/stack/context');
const boardForm = require('../forms/board-form.cjs');
const pageWrapper = require('../shared/page-wrapper.cjs');

function NewBoardPage() {
  const { Link: OverrideLink, navigate: overrideNavigate } = context.usePluginOverrides("kanban");
  const navigate = overrideNavigate || ((path) => {
    window.location.href = path;
  });
  const Link = OverrideLink || "a";
  const handleSuccess = (boardId) => {
    navigate(`/pages/kanban/${boardId}`);
  };
  return /* @__PURE__ */ jsxRuntime.jsxs(pageWrapper.PageWrapper, { "data-testid": "new-board-page", children: [
    /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4 mb-8", children: [
      /* @__PURE__ */ jsxRuntime.jsx(
        Link,
        {
          href: "/pages/kanban",
          className: "text-muted-foreground hover:text-foreground",
          children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ArrowLeft, { className: "h-5 w-5" })
        }
      ),
      /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
        /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold", "data-testid": "page-header", children: "Create New Board" }),
        /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mt-1", children: "Set up a new kanban board for your project" })
      ] })
    ] }),
    /* @__PURE__ */ jsxRuntime.jsxs(card.Card, { className: "max-w-2xl", children: [
      /* @__PURE__ */ jsxRuntime.jsxs(card.CardHeader, { children: [
        /* @__PURE__ */ jsxRuntime.jsx(card.CardTitle, { children: "Board Details" }),
        /* @__PURE__ */ jsxRuntime.jsx(card.CardDescription, { children: "Enter the details for your new kanban board." })
      ] }),
      /* @__PURE__ */ jsxRuntime.jsx(card.CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
        boardForm.BoardForm,
        {
          onClose: () => navigate("/pages/kanban"),
          onSuccess: handleSuccess
        }
      ) })
    ] })
  ] });
}

exports.NewBoardPage = NewBoardPage;
