import type { Meta } from '@storybook/vue3'; import { ref } from 'vue'; import { Utils } from '@youcan/ui-core'; import { Draggable, DraggableItem } from '~/components'; import type { DraggableItemType } from '~/types'; const meta: Meta = { title: 'Application/Draggable', component: Draggable, tags: ['draggable'], argTypes: { modelValue: { table: { disable: true } }, }, }; export default meta; const DraggableTemplate = (args: Record) => ({ components: { Draggable, DraggableItem }, setup() { const items = ref([ { label: 'Navbar', value: 1, checked: false, }, { label: 'Hero', value: 2, checked: false, }, { label: 'Featured Products', value: 3, checked: false, }, ]); return { args, items }; }, template: ` `, }); export const Draggable_ = Utils.templatify(DraggableTemplate.bind({})); Draggable_.args = { canCheck: false, }; const DraggableItemTemplate = (args: Record) => ({ components: { DraggableItem }, setup() { const item = ref({ label: 'Navbar', value: 1, checked: false, }); return { args, item }; }, template: '', }); export const DraggableItem_ = Utils.templatify(DraggableItemTemplate.bind({})); DraggableItem_.args = { canCheck: false, };