import type { Meta, StoryFn } from '@storybook/vue3-vite';
import { UIIcons, UIColor } from '@/UI-kit/constants';
import UIBlockCardType1 from '@/UI-blocks/components/BlockCard/UIBlockCardType1.vue';
import {ChevronRight} from "@/UI-kit/components/icons";

export default {
    title: 'UIBlock/UIBlockCardType1',
    component: UIBlockCardType1,
    argTypes: {
        text: {
            control: { type: 'text' },
        },
        leftIcon: {
            control: { type: 'select' },
            options: Object.keys(UIIcons),
            description: 'Имя иконки, соответствует имени SVG файла',
        },
        rightIcon: {
            control: { type: 'select' },
            options: Object.keys(UIIcons),
            description: 'Цвет иконки из UISvgIconColorFill || UISvgIconColorStroke',
        },
    },
    args: {
        text: 'text',
        leftIcon: UIIcons.Car,
        rightIcon: UIIcons.ChevronRight,
    },
} as Meta<typeof UIBlockCardType1>;

export const Default: StoryFn<typeof UIBlockCardType1> = (args) => ({
    components: { UIBlockCardType1 },
    setup() {
        return { args, UIColor };
    },
    template: `<UIBlockCardType1 v-bind="args" />`,
});
