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

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

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

export const Default = Template.bind({});
Default.args = {
  items: [
    { icon: "check", text: "one", action: "first", iconType: "solid", iconClass: "text-gray-400" },
    { icon: "check", text: "two", action: "second", iconType: "solid", iconClass: "text-gray-400", isDisabled: true },
    { icon: "check", text: "three", action: "third", iconType: "solid", iconClass: "text-gray-400", iconViewBox: "0 0 24 24" },
  ],
  type: "primary",
  label: "Button",
  isLoading: false,
};
