import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Code2, Terminal } from 'lucide-react';
import { ActionButton } from './action-button.js';
const meta = {
    title: 'Common/ActionButton',
    component: ActionButton,
    tags: ['autodocs'],
    parameters: {
        layout: 'centered',
    },
    args: {
        label: 'Open in IDE',
        loading: false,
        error: false,
        icon: Code2,
    },
};
export default meta;
function noop() {
    // intentional no-op for stories
}
/** Default labeled button with outline variant. Plays "click" sound on press. */
export const Default = {
    args: {
        onClick: noop,
    },
};
/** Loading state — spinner replaces icon, button is disabled. */
export const Loading = {
    args: {
        loading: true,
        onClick: noop,
    },
};
/** Error state — CircleAlert icon with destructive text color. */
export const Error = {
    args: {
        error: true,
        onClick: noop,
    },
};
/** Icon-only mode — no label text, compact rendering. */
export const IconOnly = {
    args: {
        iconOnly: true,
        variant: 'ghost',
        size: 'icon-xs',
        onClick: noop,
    },
};
/** Icon-only loading state. */
export const IconOnlyLoading = {
    args: {
        iconOnly: true,
        variant: 'ghost',
        size: 'icon-xs',
        loading: true,
        onClick: noop,
    },
};
/** Icon-only error state. */
export const IconOnlyError = {
    args: {
        iconOnly: true,
        variant: 'ghost',
        size: 'icon-xs',
        error: true,
        onClick: noop,
    },
};
/** Ghost variant with icon-xs size (used by repository node). */
export const GhostVariant = {
    args: {
        variant: 'ghost',
        size: 'icon-xs',
        iconOnly: true,
        onClick: noop,
    },
};
/** Both buttons side-by-side (labeled, as in feature drawer). */
export const BothButtonsLabeled = {
    render: () => (_jsxs("div", { className: "flex gap-2", children: [_jsx(ActionButton, { label: "Open in IDE", onClick: noop, loading: false, error: false, icon: Code2 }), _jsx(ActionButton, { label: "Open in Shell", onClick: noop, loading: false, error: false, icon: Terminal })] })),
};
/** Both buttons side-by-side (icon-only, as on repository node). Always visible, grey by default, blue on hover. */
export const BothButtonsIconOnly = {
    render: () => (_jsxs("div", { className: "flex gap-1", children: [_jsx(ActionButton, { label: "Open in IDE", onClick: noop, loading: false, error: false, icon: Code2, iconOnly: true, variant: "ghost", size: "icon-xs" }), _jsx(ActionButton, { label: "Open in Shell", onClick: noop, loading: false, error: false, icon: Terminal, iconOnly: true, variant: "ghost", size: "icon-xs" }), _jsx(ActionButton, { label: "Add", onClick: noop, loading: false, error: false, icon: Code2, iconOnly: true, variant: "ghost", size: "icon-xs" })] })),
};
