import type { RelativeStoragePath, SiteScopedStoragePath } from '../../core/src/index';
import type { MediaAsset, TransformRect } from './types';
/**
 * Options for Supabase image transformations.
 * See: https://supabase.com/docs/guides/storage/serving/image-transformations
 */
export type DirectImageUrlOptions = {
    /** Target width in pixels */
    width?: number;
    /** Target height in pixels */
    height?: number;
    /** Image quality 1-100 (default: 80) */
    quality?: number;
    /** Resize mode */
    resize?: 'cover' | 'contain' | 'fill';
};
export type DirectImageUrlPathTarget = Readonly<{
    kind: 'relative';
    storagePath: RelativeStoragePath;
    siteId: string;
}> | Readonly<{
    kind: 'site-scoped';
    storagePath: SiteScopedStoragePath;
}> | Readonly<{
    kind: 'bucket-scoped';
    storagePath: string;
}>;
export declare function isRelativeDirectImageStoragePath(storagePath: string): storagePath is RelativeStoragePath;
export declare function isSiteScopedDirectImageStoragePath(storagePath: string): storagePath is SiteScopedStoragePath;
export declare function getDirectImageUrlForRelativePath(supabaseUrl: string, storagePath: RelativeStoragePath, siteId: string, storageBucket?: string, options?: DirectImageUrlOptions): string;
export declare function getDirectImageUrlForSiteScopedPath(supabaseUrl: string, storagePath: SiteScopedStoragePath, storageBucket?: string, options?: DirectImageUrlOptions): string;
export declare function getDirectImageUrlForBucketPath(supabaseUrl: string, storagePath: string, storageBucket?: string, options?: DirectImageUrlOptions): string;
export declare function getDirectImageUrlForStoragePath(supabaseUrl: string, storagePath: RelativeStoragePath | SiteScopedStoragePath | string, storageBucket?: string, siteId?: string, options?: DirectImageUrlOptions): string;
/**
 * @deprecated Prefer `getDirectImageUrlForMediaAsset`, `getDirectImageUrlForRelativePath`,
 * `getDirectImageUrlForSiteScopedPath`, or `getDirectImageUrlForBucketPath` so path shape
 * is explicit at the call site.
 *
 * Build a direct Supabase storage URL for an image.
 *
 * For images with transform options, uses the render endpoint which applies
 * server-side transformations. For images without transforms (or SVGs),
 * returns the direct public object URL.
 *
 * @param supabaseUrl - Supabase project URL (e.g., https://xxx.supabase.co)
 * @param storagePath - Relative path within the bucket (e.g., originals/2024/12/img.png)
 * @param storageBucket - Storage bucket name (default: 'media')
 * @param siteId - Site UUID to prepend as path prefix
 * @param options - Optional transform parameters
 * @returns Direct URL to the image
 */
export declare function getDirectImageUrl(supabaseUrl: string, storagePath: RelativeStoragePath | SiteScopedStoragePath | string, storageBucket?: string, siteId?: string, options?: DirectImageUrlOptions): string;
export type DirectImageMediaAsset = Pick<MediaAsset, 'storageBucket' | 'storagePath'>;
export declare function getDirectImageUrlForMediaAsset(supabaseUrl: string, asset: DirectImageMediaAsset, options?: DirectImageUrlOptions): string;
export type ImageProxyFit = 'clip' | 'crop' | 'max';
export type ImageProxyParams = {
    w?: number;
    h?: number;
    fit?: ImageProxyFit;
    rect?: TransformRect;
    q?: number;
    or?: 0 | 90 | 180 | 270;
    autoFormat?: boolean;
};
export declare const getImageUrl: (asset: Pick<MediaAsset, "id">, params?: ImageProxyParams, basePath?: string) => string;
