{"version":3,"file":"alert2.mjs","sources":["../../../../../../../packages/components/alert/src/alert.ts"],"sourcesContent":["import { useDelayedToggleProps } from '@hd-front-end/hooks'\nimport {\n  TypeComponentsMap,\n  buildProps,\n  isUndefined,\n  keysOf,\n} from '@hd-front-end/utils'\n\nimport type { ExtractPropTypes, __ExtractPublicPropTypes } from 'vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport const alertProps = buildProps({\n  /**\n   * @description alert title.\n   */\n  title: {\n    type: String,\n    default: '',\n  },\n  description: {\n    type: String,\n    default: '',\n  },\n  /**\n   * @description alert type.\n   */\n  type: {\n    type: String,\n    values: keysOf(TypeComponentsMap),\n    default: 'info',\n  },\n  /**\n   * @description whether alert can be dismissed.\n   */\n  closable: {\n    type: Boolean,\n    default: true,\n  },\n  /**\n   * @description text for replacing x button\n   */\n  closeText: {\n    type: String,\n    default: '',\n  },\n  /**\n   * @description whether show icon\n   */\n  showIcon: Boolean,\n  /**\n   * @description should content be placed in center.\n   */\n  center: Boolean,\n  effect: {\n    type: String,\n    values: alertEffects,\n    default: 'light',\n  },\n  ...useDelayedToggleProps,\n  /**\n   * @description delay of appearance, in millisecond\n   */\n  showAfter: Number,\n} as const)\nexport type AlertProps = ExtractPropTypes<typeof alertProps>\nexport type AlertPropsPublic = __ExtractPublicPropTypes<typeof alertProps>\n\nexport const alertEmits = {\n  open: () => true,\n  close: (evt?: Event) => isUndefined(evt) || evt instanceof Event,\n}\nexport type AlertEmits = typeof alertEmits\n"],"names":[],"mappings":";;;;;;AAUa,MAAA,YAAA,GAAe,CAAC,OAAA,EAAS,MAAM,EAAA;AAErC,MAAM,aAAa,UAAW,CAAA;AAAA,EAInC,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,MAAA,EAAQ,OAAO,iBAAiB,CAAA;AAAA,IAChC,OAAS,EAAA,MAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA,OAAA;AAAA,EAIV,MAAQ,EAAA,OAAA;AAAA,EACR,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,MAAQ,EAAA,YAAA;AAAA,IACR,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EACA,GAAG,qBAAA;AAAA,EAIH,SAAW,EAAA,MAAA;AACb,CAAU,EAAA;AAIH,MAAM,UAAa,GAAA;AAAA,EACxB,MAAM,MAAM,IAAA;AAAA,EACZ,OAAO,CAAC,GAAA,KAAgB,WAAY,CAAA,GAAG,KAAK,GAAe,YAAA,KAAA;AAC7D;;;;"}