import { Coordinates, CropperResult, ImageTransforms } from 'vue-advanced-cropper'; import type { ButtonColor, ButtonType, TIcon } from '../../types'; type resultDataType = { coordinates: null | Coordinates; image: null | ImageResult; }; interface ImageState { url: string; name: string; type: string; size: number; } interface ImageResult { width: number; height: number; transforms: ImageTransforms; src: string | null; } /** * The subset of the vue-advanced-cropper instance API this component drives. * Declared explicitly (rather than `InstanceType`) so the * ref can be populated by the real component at runtime and by lightweight * mocks in tests without casting. Methods are optional because a mounted * cropper may not have initialised yet and tests provide partial stubs. */ export interface CropperElement { zoom?: (factor: number) => void; rotate?: (angle: number) => void; getResult?: () => CropperResult; } interface IImageUploaderProps { buttonType?: ButtonType; buttonColor?: ButtonColor; /** * @description Icon shown in the upload button. Accepts a class * string (legacy `vc-icon-*`) or a Vue component (e.g. a Lucide * icon from `@lucide/vue`). */ icon?: TIcon; contentTitle?: string; previewTitle?: string; } declare function zoom(factor: number): void; declare function rotate(angle: number): void; declare function openExplorer(): void; declare function resetUrlData(): void; declare function loadFile(file: File | null): Promise; declare function error(error: unknown): void; declare function closeDialog(): void; declare function onSaveHandler(): void; declare const _default: __VLS_WithTemplateSlots, { buttonType: string; buttonColor: string; icon: string; contentTitle: string; previewTitle: string; }>>, { open: typeof openExplorer; close: typeof closeDialog; dialog: import("vue").Ref; loading: import("vue").Ref; imageState: import("vue").Ref<{ url: string; name: string; type: string; size: number; } | null, ImageState | { url: string; name: string; type: string; size: number; } | null>; result: import("vue").Ref<{ coordinates: { width: number; height: number; top: number; left: number; } | null; image: { width: number; height: number; transforms: { rotate: number; flip: { horizontal: boolean; vertical: boolean; }; }; src: string | null; } | null; }, resultDataType | { coordinates: { width: number; height: number; top: number; left: number; } | null; image: { width: number; height: number; transforms: { rotate: number; flip: { horizontal: boolean; vertical: boolean; }; }; src: string | null; } | null; }>; cropElementRef: import("vue").Ref; loadFile: typeof loadFile; onSaveHandler: typeof onSaveHandler; zoom: typeof zoom; rotate: typeof rotate; resetUrlData: typeof resetUrlData; closeDialog: typeof closeDialog; error: typeof error; contentTitleText: import("vue").ComputedRef; previewTitleText: import("vue").ComputedRef; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { "upload:file": (pl: ImageState | null) => void; save: (image: string, cropRes?: CropperResult | undefined) => void; }, string, import("vue").PublicProps, Readonly, { buttonType: string; buttonColor: string; icon: string; contentTitle: string; previewTitle: string; }>>> & Readonly<{ onSave?: ((image: string, cropRes?: CropperResult | undefined) => any) | undefined; "onUpload:file"?: ((pl: ImageState | null) => any) | undefined; }>, { icon: TIcon; buttonType: ButtonType; buttonColor: "" | "success" | "warning" | "primary" | "secondary" | "destructive" | "active" | "primary-alternative"; contentTitle: string; previewTitle: string; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, { "upload-action"?(_: { loading: boolean; handler: typeof openExplorer; }): any; }>; export default _default; type __VLS_NonUndefinedable = T extends undefined ? never : T; type __VLS_TypePropsToRuntimeProps = { [K in keyof T]-?: {} extends Pick ? { type: import('vue').PropType<__VLS_NonUndefinedable>; } : { type: import('vue').PropType; required: true; }; }; type __VLS_WithDefaults = { [K in keyof Pick]: K extends keyof D ? __VLS_Prettify : P[K]; }; type __VLS_Prettify = { [K in keyof T]: T[K]; } & {}; type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; };