import { FieldsBridge, Render, Studio, Template } from '@bluepic/types';
import { Ref } from 'vue';
import { z } from '@hono/zod-openapi';
import BxLiveTemplate from '../components/TemplateEditor/BxLiveTemplate.vue';
export declare const imageFormats: {
    png: "image/png";
    jpeg: "image/jpeg";
    webp: "image/webp";
    pdf: "application/pdf";
};
export declare const videoFormats: {
    mp4: "video/mp4";
    mov: "video/quicktime";
};
export type RenderRemoteOptions = {
    apiBaseUrl: string;
    env: 'dev' | 'prod';
    enforceFallbackService: boolean;
    bearerToken?: string;
    password?: string;
};
export declare function renderSerialRemote(campaignId: number, templateId: string, data: {
    [k: string]: unknown;
}, width: number, height: number, framesX: number, framesY: number, format: keyof typeof imageFormats, opts: RenderRemoteOptions): Promise<Blob>;
export type RenderRemoteVideoOptions = {
    remoteVideoRenderBaseUrl: string;
};
export declare function renderVideoRemote(serial: Template.Serial, data: {
    [k: string]: unknown;
}, width: number, height: number, format: z.infer<typeof Render.videoFormatSchema>, duration: number, videoOpts: {
    fps: number;
    vcodec: z.infer<typeof Render.vcodecSchema>;
    acodec: z.infer<typeof Render.acodecSchema>;
    pix_fmt: z.infer<typeof Render.pixFmtSchema>;
    audio: {
        itsoffset: number;
        src: string;
    }[];
}, options: RenderRemoteVideoOptions, onProgress: (progress: Render.RenderProgressEvent) => void): Promise<{
    files: string[];
    creditsConsumed: number;
}>;
export declare function renderSerialAsImages(bxLiveTemplateComponent: InstanceType<typeof BxLiveTemplate>, serial: Template.Serial, data: {
    [k: string]: unknown;
}, format: keyof typeof imageFormats, campaignId: number, templateId: string, remoteOptions: RenderRemoteOptions, enforceServerSideRendering: boolean, consumeCreditsAfterLocalRender: boolean, watermark: boolean, sessionState: string): Promise<Blob[]>;
export declare function useTemplateExport(serial: Ref<Template.Serial | undefined>, data: Ref<{
    [k: string]: unknown;
}>, exportOptions: Ref<z.infer<typeof Studio.campaignConfigSchema>['export']>, templateId: Ref<string | undefined>, name: Ref<string | undefined>, bxLiveTemplateComponentRef: Ref<InstanceType<typeof BxLiveTemplate> | undefined>, campaignId: Ref<number | undefined>, remoteOptions: RenderRemoteOptions, remoteVideoOptions: RenderRemoteVideoOptions, enforceServerSideRendering: Ref<boolean>, enforceVideoServerSideRendering: Ref<boolean>, timecode: Ref<number>, consumeCreditsOnRender: Ref<boolean>, watermark: Ref<boolean>, bridge: Ref<FieldsBridge>, preCacheLocalRendering: Ref<boolean>): {
    triggerExport: () => Promise<void>;
    preCacheLocalRender: () => Promise<void>;
    rendering: Ref<boolean, boolean>;
    videoRenderingProgress: Ref<number | undefined, number | undefined>;
};
export declare function consumeCredits(apiBaseUrl: string, env: 'dev' | 'prod', campaignId: number, templateId: string, sessionState: string, billingKey: number): Promise<void>;
export declare function hasMobileShareCapability(files: File[]): boolean;
export declare function blobsToShareFiles(files: Blob[], baseName: string): File[];
export declare function performDownload(files: Blob[], baseName: string): Promise<void>;
export type ActionContext = {
    templateId: string;
    campaignId: number;
    data: {
        [k: string]: unknown;
    };
    assets: string[];
    caption?: string;
};
export declare function performWebhook(webhookUrl: string, context: ActionContext): Promise<void>;
export declare function performRedirect(redirectUrl: string, context: ActionContext): Promise<void>;
