import type { Meta, StoryObj } from "@storybook/react";
import { useState } from "react";
import { Tabs } from "@managemate/react";

const meta = {
  title: "Navigation/Tabs",
  component: Tabs,
  tags: ["autodocs"],
} satisfies Meta<typeof Tabs>;

export default meta;
type Story = StoryObj<typeof meta>;

export const Default: Story = {
  render: () => {
    const [v, setV] = useState("a");
    return (
      <Tabs
        value={v}
        onChange={setV}
        items={[
          { id: "a", label: "Aperçu" },
          { id: "b", label: "Détails" },
          { id: "c", label: "Données" },
          { id: "d", label: "Activité" },
        ]}
      />
    );
  },
};
