import CButtonSelectBorder from "../components/CButtonSelectBorder";
import CIcon from "../components/CIcon/CIcon.vue";
import "./utils.css";

export default {
  title: "CButtonSelectBorder",
  component: CButtonSelectBorder,
  subcomponents: { CIcon },
  argTypes: {
    type: {
      control: {
        type: "select",
        options: [
          "primary",
          "secondary",
          "success",
          "danger",
          "white",
          "white-rounded-right",
          "dark-blue",
          "white-plain"
        ],
      },
    },
    items: { control: { type: "object" } },
  },
};

const Template = (args, { argTypes }) => ({
  props: Object.keys(argTypes),
  components: { CButtonSelectBorder },
  template: '<c-button-select-border v-bind="$props" />',
});

export const Default = Template.bind({});
Default.args = {
  items: [
    { icon: "check", text: "one", action: "first", iconType: "solid" },
    { icon: "check", text: "one", action: "first", iconType: "solid" },
    { hasNoData: true },
    { icon: "check", text: "one", action: "first", iconType: "solid" },
    { hasNoData: true },
    { icon: "check", text: "two", action: "second", iconType: "solid" },
    { hasNoData: true },
    { icon: "check", text: "two", action: "second", iconType: "solid" },
    { icon: "check", text: "two", action: "second", iconType: "solid" },
  ],
  type: "primary",
  label: "Button",
  isLoading: false,
  labelIcon: {
    name: "check",
    type: "solid",
    class: "mr-2 h-5 w-5 text-gray-400",
  },
};
