{"version":3,"file":"Notification.stories.mjs","names":["UNotification","UButton","useNotification","$useNotification","meta","title","component","tags","argTypes","color","control","options","delay","iconTop","undefined","iconLeft","position","elevation","Notification","render","args","components","setup","notify","run","text","closeNotification","console","log","template","ResendEmailNotification"],"sources":["../../src/stories/Notification.stories.ts"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/vue3'\nimport { ref } from 'vue'\nimport {\n  UNotification,\n  UNotificationProps,\n} from '../components/UNotification/UNotification'\nimport { UButton } from '../components'\n\nimport { useNotification } from '../components'\nconst $useNotification = useNotification()\n\nconst meta: Meta<typeof UNotification> = {\n  title: 'Example/Notification',\n  component: UNotification,\n  tags: ['autodocs'],\n  argTypes: {\n    color: {\n      control: 'select',\n      options: ['primary', 'success', 'warning', 'error'],\n    },\n    delay: {\n      control: 'select',\n      options: [1000, 2000, 3000, 4000, 5000],\n    },\n    iconTop: {\n      control: 'select',\n      options: [undefined, 'folder', 'checkVerified1', 'star2', 'codepen'],\n    },\n    iconLeft: {\n      control: 'select',\n      options: [undefined, 'folder', 'checkVerified1', 'star2', 'codepen'],\n    },\n    position: {\n      control: 'select',\n      options: ['topLeft', 'topRight', 'bottomLeft', 'bottomRight'],\n    },\n    elevation: { control: 'select', options: ['none', 'sm', 'md', 'lg'] },\n  },\n}\n\nexport default meta\n\ntype Story = StoryObj<typeof UNotification>\n\nexport const Notification: Story = {\n  render: (args: UNotificationProps) => ({\n    components: { UNotification, UButton },\n    setup() {\n      const notify = () => {\n        $useNotification?.run({\n          title: 'network error',\n          text: 'Something goes wrong!',\n          color: 'error',\n          iconLeft: 'activity',\n          delay: 50000,\n        })\n      }\n      const closeNotification = () => {\n        console.log('closed :|')\n      }\n      return { args, notify, closeNotification }\n    },\n    template: `<div class=\"relative overflow-hidden h-[560px]\">\n    <UButton type=\"default\" @click=\"notify\">Notify</UButton>\n    <UNotification @close=\"closeNotification\"></UNotification>\n    </div>`,\n  }),\n  args: {\n    color: 'success',\n    iconLeft: 'checkVerified1',\n    position: 'bottomRight',\n  } as UNotificationProps,\n}\n\nexport const ResendEmailNotification: Story = {\n  render: (args: UNotificationProps) => ({\n    components: { UNotification, UButton },\n    setup() {\n      return { args }\n    },\n    template: `<div class=\"relative h-[560px]\">  \n    <UNotification \n    v-bind=\"args\"\n    v-model:isActive=\"isNotification\">\n        <template #notificationTitle>Done</template>\n        <template #notificationText>We sent the link again</template>  \n    </UNotification>\n    </div>`,\n  }),\n  args: {\n    color: 'success',\n    iconLeft: 'checkVerified1',\n    position: 'bottomRight',\n  } as UNotificationProps,\n}\n"],"mappings":"SAGEA,aAAa;AAAA,SAGNC,OAAO;AAAA,SAEPC,eAAe;AACxB,IAAMC,gBAAgB,GAAGD,eAAe,CAAC,CAAC;AAE1C,IAAME,IAAgC,GAAG;EACvCC,KAAK,EAAE,sBAAsB;EAC7BC,SAAS,EAAEN,aAAa;EACxBO,IAAI,EAAE,CAAC,UAAU,CAAC;EAClBC,QAAQ,EAAE;IACRC,KAAK,EAAE;MACLC,OAAO,EAAE,QAAQ;MACjBC,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO;IACpD,CAAC;IACDC,KAAK,EAAE;MACLF,OAAO,EAAE,QAAQ;MACjBC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACxC,CAAC;IACDE,OAAO,EAAE;MACPH,OAAO,EAAE,QAAQ;MACjBC,OAAO,EAAE,CAACG,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS;IACrE,CAAC;IACDC,QAAQ,EAAE;MACRL,OAAO,EAAE,QAAQ;MACjBC,OAAO,EAAE,CAACG,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS;IACrE,CAAC;IACDE,QAAQ,EAAE;MACRN,OAAO,EAAE,QAAQ;MACjBC,OAAO,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,YAAY,EAA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