import type { Meta, StoryFn } from "@storybook/react";

import { CopyActionMenu, View } from "@phoenix/components";

const meta: Meta = {
  title: "Core/Actions/Copy Action Menu",
  component: CopyActionMenu,
  parameters: {
    layout: "centered",
  },
};

export default meta;

export const Default = {
  args: {
    items: [
      { name: "Project Name", value: "my-project", iconKey: "Text" },
      { name: "Project ID", value: "proj_abc123", iconKey: "ID" },
    ],
  },
};

export const WithoutIcons = {
  args: {
    items: [
      { name: "Name", value: "example-name" },
      { name: "ID", value: "id_12345" },
    ],
  },
};

export const SingleItem = {
  args: {
    items: [{ name: "API Key", value: "sk-abc123", iconKey: "Key" }],
  },
};

export const ManyItems: StoryFn = () => (
  <View padding="size-200">
    <CopyActionMenu
      items={[
        { name: "Dataset Name", value: "eval-dataset", iconKey: "Text" },
        { name: "Dataset ID", value: "ds_xyz789", iconKey: "ID" },
        { name: "Version", value: "v1.2.3", iconKey: "GitBranch" },
        {
          name: "Created At",
          value: "2025-01-15T10:30:00Z",
          iconKey: "Calendar",
        },
      ]}
    />
  </View>
);
