import CAnchorTag from "../components/CAnchorTag/CAnchorTag.vue";
import "./utils.css";

export default {
  title: "CAnchorTag",
  component: CAnchorTag,
  argTypes: {
    label: String,
    href: String,
    icon: { control: { type: "object" } },
    color: { control: { type: "select", options: ["blue", "red"] } },
    action: Function,
    disabled: { control: { type: "boolean" } },
  },
};

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

const clickAction = () => {
  console.log("link clicked")
}

export const Default = Template.bind({});
Default.args = {
  href: "#",
  label: "Add item",
  icon: {
    name: "download",
    type: "outline",
  },
  color: "blue",
  action: clickAction,
  disabled: false,
};
