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

export default {
  title: "CButtonWithDropdown",
  component: CButtonWithDropdown,
  subcomponents: { CIcon },
  argTypes: {
    type: {
      control: {
        type: "select",
        options: [
          "primary",
          "secondary",
          "success",
          "danger",
          "light-green",
          "light-red",
        ],
      },
    },
    items: { control: { type: "object" } },
  },
};

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

export const Default = Template.bind({});
Default.args = {
  items: [
    { text: "one", value: "one" },
    { text: "two", value: "two" },
  ],
  //   type: 'primary',
  label: "Button",
};
