{"version":3,"file":"alert.mjs","sources":["../../../../../../packages/components/alert/src/alert.ts"],"sourcesContent":["import { UPDATE_MODEL_EVENT } from '@vuesax-alpha/constants'\nimport { useColorProp } from '@vuesax-alpha/hooks'\nimport { buildProps, isBoolean, isNumber } from '@vuesax-alpha/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Alert from './alert.vue'\n\nexport const alertProps = buildProps({\n  /**\n   * @description Component color - Accept Vuesax's color, Hex, rgb\n   */\n  color: { ...useColorProp, default: 'primary' },\n  /**\n   * @description\twhether alert can be dismissed.\n   */\n  closable: {\n    type: Boolean,\n  },\n  /**\n   * @description With this property you can hide the content of the alert.\n   */\n  hiddenContent: {\n    type: Boolean,\n    default: null,\n  },\n  /**\n   * @description Determine if the component is visible.\n   * @default 'true'\n   */\n  modelValue: {\n    type: Boolean,\n    default: true,\n  },\n  /**\n   * @description Determine the page that is active (this property is linked to the slots=\"page-{n}\").\n   * @default 0\n   */\n  page: {\n    type: Number,\n    default: 0,\n  },\n  /**\n   * @description Add a progress bar to the alert and the value is the percentage of width.\n   * @default 0\n   */\n  progress: {\n    type: [Number, String],\n    default: 0,\n  },\n  /**\n   * @deprecated\n   */\n  time: {\n    type: [Number, String],\n    default: 0,\n  },\n  /**\n   * @description Change the style of all the alert.\n   * @enum | '' | border | flat | gradient | relief | shadow | solid |\n   * @default ''\n   */\n  type: {\n    type: String,\n    values: [\n      '',\n      'border',\n      'flat',\n      'gradient',\n      'relief',\n      'shadow',\n      'solid',\n    ] as const,\n    default: '',\n  },\n\n  /** TODO: remove in 0.3.0 */\n  /** @deprecated use prop [type] instead */\n  border: Boolean,\n  /** @deprecated use prop [type] instead */\n  flat: Boolean,\n  /** @deprecated use prop [type] instead */\n  gradient: Boolean,\n  /** @deprecated use prop [type] instead */\n  relief: Boolean,\n  /** @deprecated use prop [type] instead */\n  shadow: Boolean,\n  /** @deprecated use prop [type] instead */\n  solid: Boolean,\n} as const)\n\nexport type AlertProps = ExtractPropTypes<typeof alertProps>\n\nexport const alertEmits = {\n  [UPDATE_MODEL_EVENT]: (value: boolean) => isBoolean(value),\n  'update:page': (value: number) => isNumber(value),\n  'update:hiddenContent': (value: boolean) => isBoolean(value),\n}\n\nexport type AlertEmits = typeof alertEmits\n\nexport type AlertInstance = InstanceType<typeof Alert>\n"],"names":[],"mappings":";;;;;;;;AAOO,MAAM,aAAa,UAAW,CAAA;AAAA,EAInC,KAAO,EAAA,EAAE,GAAG,YAAA,EAAc,SAAS,SAAU,EAAA;AAAA,EAI7C,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,GACR;AAAA,EAIA,aAAe,EAAA;AAAA,IACb,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAKA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAKA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EAKA,QAAU,EAAA;AAAA,IACR,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA;AAAA,IACJ,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EAMA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,MAAQ,EAAA;AAAA,MACN,EAAA;AAAA,MACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA;AAAA,KACF;AAAA,IACA,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,MAAQ,EAAA,OAAA;AAAA,EAER,IAAM,EAAA,OAAA;AAAA,EAEN,QAAU,EAAA,OAAA;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