export declare const DEFAULT_ACCEPTED_EXTENSIONS = ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv,.jpg,.jpeg,.png,.webp"; /** Tamaño máximo por archivo individual (MB) */ export declare const DEFAULT_MAX_FILE_SIZE_MB = 10; /** Tamaño máximo acumulado de todos los archivos del registro (MB) */ export declare const DEFAULT_MAX_TOTAL_SIZE_MB = 50; /** * Represents a resource (file or image) in the gallery. */ export interface GalleryResource { /** Unique identifier of the resource (UUID) */ uuid: string; /** URL to view or download the resource */ url: string; /** File name */ name: string; /** File type (MIME type or extension) */ type: string; /** File size in bytes (used to enforce maxTotalSizeMB) */ size?: number; /** Indicates if the resource is selected */ checked?: boolean; } /** * Props for the FileUploaderGallery component */ export interface FileUploaderGalleryProps { /** Main title appearing in the header */ title: string; /** Name of the entity it refers to (e.g., "Customers") */ entity: string; /** Unique identifier of the associated record */ entityId: string | number; /** * Component display mode * @default 'modal' */ mode?: 'page' | 'modal'; /** * If modal, defines if it appears maximized (full screen) * @default false */ isMaximized?: boolean; /** * List of resources or files to display */ resources: GalleryResource[]; /** * Enables checkboxes to select resources * @default false */ allowSelection?: boolean; /** * Text for the main action button * @default 'Aceptar' */ acceptButtonText?: string; /** * Indicates if the file upload component is shown * @default true */ showFileUploader?: boolean; /** * Defines if the file name is shown below the thumbnail. * Default: false for images, true for other files. */ showFileName?: boolean; /** * Indicates if the gallery is in a loading state * @default false */ isLoading?: boolean; /** * Enables the option to delete resources * @default false */ allowDeletion?: boolean; /** * Error message to display in a system alert */ error?: { title: string; message: string; } | null; /** Callback executed when a resource is accepted/confirmed */ onAccept?: (selected: GalleryResource[]) => void; /** Callback executed when closing the modal or cancelling */ onClose?: () => void; /** Callback executed when navigating back (page mode) */ onBack?: () => void; /** Callback to handle the upload of a new file */ onUpload?: (file: File) => Promise; /** Callback to handle the deletion of a resource */ onDelete?: (uuid: string) => Promise; /** Callback executed when change in resource selection */ onResourceCheck?: (uuid: string, checked: boolean, selectedResources: GalleryResource[]) => void; /** Additional CSS class for the container */ className?: string; /** * Embedded mode: hides the header (title/close) and footer (cancel/accept buttons). * Use when rendering inside a form tab where the parent controls the save action. * @default false */ embedded?: boolean; /** * Extensiones de archivo permitidas, separadas por coma. * Ej: '.pdf,.docx,.jpg' * @default DEFAULT_ACCEPTED_EXTENSIONS */ acceptedExtensions?: string; /** * Tamaño máximo permitido por archivo individual, en MB. * @default DEFAULT_MAX_FILE_SIZE_MB (10 MB) */ maxFileSizeMB?: number; /** * Tamaño máximo acumulado de todos los archivos del registro, en MB. * Se valida sumando el campo `size` de los GalleryResource existentes. * @default DEFAULT_MAX_TOTAL_SIZE_MB (50 MB) */ maxTotalSizeMB?: number; /** * Permite seleccionar y subir múltiples archivos a la vez. * En false, solo se acepta un archivo por operación de subida. * @default true */ multipleFiles?: boolean; } //# sourceMappingURL=FileUploaderGallery.types.d.ts.map