import type { Meta, StoryObj } from "@storybook/vue3-vite"
import LinkAction from "./LinkAction.vue"
import { componentDoc } from "@/lib/storybook"

const meta = {
  title: "Elements/Action/LinkAction",
  component: LinkAction,
  tags: ["autodocs"],
  parameters: componentDoc("LinkAction", { barrel: "action" }),
  args: { label: "More info" },
} satisfies Meta<typeof LinkAction>

export default meta
type Story = StoryObj<typeof meta>

export const Default: Story = {
  args: { label: "More info" },
}

export const WithHref: Story = {
  args: {
    label: "Open docs",
    href: "https://example.com",
    target: "_blank",
  },
}

export const WithIcon: Story = {
  args: { label: "View profile", icon: "user" },
}

export const Disabled: Story = {
  args: { label: "Unavailable", disabled: true },
}

export const Emitting: Story = {
  args: { label: "Refresh", icon: "refresh-cw", emit: "refresh" },
}
