{"version":3,"file":"upload-content.mjs","sources":["../../../../../../packages/components/upload/src/upload-content.ts"],"sourcesContent":["import { NOOP } from '@vue/shared'\r\nimport { buildProps, definePropType } from '@sgui-plus/utils/props'\r\nimport { uploadBaseProps } from './upload'\r\n\r\nimport type { ExtractPropTypes } from 'vue'\r\nimport type {\r\n  UploadFile,\r\n  UploadHooks,\r\n  UploadProgressEvent,\r\n  UploadRawFile,\r\n} from './upload'\r\nimport type UploadContent from './upload-content.vue'\r\nimport type { UploadAjaxError } from './ajax'\r\n\r\nexport const uploadContentProps = buildProps({\r\n  ...uploadBaseProps,\r\n\r\n  beforeUpload: {\r\n    type: definePropType<UploadHooks['beforeUpload']>(Function),\r\n    default: NOOP,\r\n  },\r\n  onRemove: {\r\n    type: definePropType<\r\n      (file: UploadFile | UploadRawFile, rawFile?: UploadRawFile) => void\r\n    >(Function),\r\n    default: NOOP,\r\n  },\r\n  onStart: {\r\n    type: definePropType<(rawFile: UploadRawFile) => void>(Function),\r\n    default: NOOP,\r\n  },\r\n  onSuccess: {\r\n    type: definePropType<(response: any, rawFile: UploadRawFile) => unknown>(\r\n      Function\r\n    ),\r\n    default: NOOP,\r\n  },\r\n  onProgress: {\r\n    type: definePropType<\r\n      (evt: UploadProgressEvent, rawFile: UploadRawFile) => void\r\n    >(Function),\r\n    default: NOOP,\r\n  },\r\n  onError: {\r\n    type: definePropType<\r\n      (err: UploadAjaxError, rawFile: UploadRawFile) => void\r\n    >(Function),\r\n    default: NOOP,\r\n  },\r\n  onExceed: {\r\n    type: definePropType<UploadHooks['onExceed']>(Function),\r\n    default: NOOP,\r\n  },\r\n} as const)\r\n\r\nexport type UploadContentProps = ExtractPropTypes<typeof uploadContentProps>\r\n\r\nexport type UploadContentInstance = InstanceType<typeof UploadContent>\r\n"],"names":[],"mappings":";;;;AAGY,MAAC,kBAAkB,GAAG,UAAU,CAAC;AAC7C,EAAE,GAAG,eAAe;AACpB,EAAE,YAAY,EAAE;AAChB,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,cAAc,CAAC,QAAQ,CAAC;AAClC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC;;;;"}