import type { Meta, StoryObj } from '@storybook/vue3';
import MOverlay from './MOverlay.vue';

const meta: Meta<typeof MOverlay> = {
  title: 'Overlay/Overlay',
  component: MOverlay,
  parameters: {
    docs: {
      description: {
        component:
          'An overlay component is a UI element that appears above the main content to display additional information or interactions, often blocking or dimming the background.',
      },
    },
  },
  args: {
    isVisible: true,
  },
  argTypes: {
    $slots: {
      table: {
        disable: true,
      },
    },
  },
  render: (args) => ({
    components: { MOverlay },
    setup() {
      return { args };
    },
    template: `
      <MOverlay v-bind="args">
        <template v-if="${'default' in args}" v-slot>${args.default}</template>
      </MOverlay>
    `,
  }),
};
export default meta;
type Story = StoryObj<typeof MOverlay>;

export const Default: Story = {};
