import { defineComponent, type PropType, reactive } from 'vue'; const component = defineComponent({ props: { kind: { type: String as PropType< 'primary' | 'secondary' | 'alternate' | 'ghost' | 'danger' >, default: 'primary', }, cyTag: String, class: String, style: String, disabled: Boolean, size: String as PropType<'m' | 's'>, href: String, newTab: Boolean, }, emits: { click: (_: MouseEvent) => { return true; }, }, setup(props, ctx) { props = reactive(props); const Tag = props.href ? 'a' : 'button'; return () => { return ( { ctx.emit('click', event); }} href={props.href ? props.href : undefined} target={props.newTab ? '_blank' : undefined} > {ctx.slots.default ? ( {ctx.slots.default()} ) : ( '' )} ); }; }, }); export default component;