import * as react from 'react';
import { ReactNode, SelectHTMLAttributes } from 'react';
import { Generation } from '../studio/index.js';
import { IntegrationConnection } from '@tangle-network/sandbox-ui/integrations';
import { Image } from 'lucide-react';

type StudioRole = 'owner' | 'admin' | 'editor' | 'viewer';
interface StudioWorkspaceProps {
    generations: Generation[];
    totalCost: number;
    workspaceId?: string;
    role: StudioRole;
    /** Polling endpoint override (default `/api/generations`). */
    generationsEndpoint?: string;
    /** Build a vault link, optionally to a specific file. Defaults to `/app/<workspaceId>/vault`. */
    vaultHref?: (filePath?: string | null) => string;
    /** Integrations page href for the publish-package "Connect" link. Defaults to `/app/<workspaceId>/integrations`. */
    integrationsHref?: string;
}
/**
 * The full studio surface: header + composer + result canvas + library drawer,
 * with the generation orchestrator (merge/poll/revalidate) wired in. The host
 * route owns the loader (auth, RBAC, the generation query) and the server
 * endpoints (`/api/generate`, `/api/media-models`, `/api/generations`); this
 * shell renders that data and drives the live UI. Role gates the composer
 * (viewers get a read-only library) and the integration-management affordances.
 */
declare function StudioWorkspace({ generations, totalCost, workspaceId, role, generationsEndpoint, vaultHref, integrationsHref, }: StudioWorkspaceProps): react.JSX.Element;

/**
 * The generation orchestrator behind a studio surface: it merges the loader's
 * rows with in-flight live generations, computes the latest batch for the
 * canvas, polls running generations until they settle, and revalidates the
 * route loader when a status changes.
 *
 * The merge keeps the canvas, the library, and the polling path looking at the
 * same full list. Polling hits `generationsEndpoint` (default `/api/generations`,
 * the convention both apps already serve); pass an override if a product routes
 * it elsewhere. `onGenerated` is wired to the composer's per-result callback.
 */
declare function useStudioGenerations(loaderGenerations: Generation[], options?: {
    workspaceId?: string;
    generationsEndpoint?: string;
}): {
    mergedGenerations: Generation[];
    latestBatch: Generation[];
    onGenerated: (generation: Generation) => void;
};

declare function ComposerHero({ workspaceId, integrationsHref, canManageIntegrations, onGenerated, }: {
    workspaceId?: string;
    integrationsHref?: string;
    canManageIntegrations: boolean;
    onGenerated: (generation: Generation) => void;
}): react.JSX.Element;

declare function Field({ label, htmlFor, className, children, }: {
    label: string;
    htmlFor?: string;
    className?: string;
    children: ReactNode;
}): react.JSX.Element;
declare function ComposerDisclosure({ summary, children }: {
    summary: ReactNode;
    children: ReactNode;
}): react.JSX.Element;
declare function NativeSelect(props: SelectHTMLAttributes<HTMLSelectElement>): react.JSX.Element;

declare function StudioHeader({ count, onOpenLibrary, canGenerate, }: {
    count: number;
    onOpenLibrary: () => void;
    canGenerate: boolean;
}): react.JSX.Element;

/**
 * Right-side overlay sheet built on Radix Dialog — gives focus-trap, scroll-lock,
 * and Escape-to-close for free. Slide/fade come from the studio-sheet-* classes in
 * ./studio.css (driven by Radix data-state), not tailwindcss-animate.
 */
declare function StudioSheet({ open, onOpenChange, title, children, }: {
    open: boolean;
    onOpenChange: (open: boolean) => void;
    title: string;
    children: ReactNode;
}): react.JSX.Element;

declare function ResultCanvas({ batch, onOpenLibrary, onSelect, }: {
    batch: Generation[];
    onOpenLibrary: () => void;
    onSelect: (generation: Generation) => void;
}): react.JSX.Element;

declare function LibraryDrawer({ open, onOpenChange, generations, totalCost, typeFilter, onFilterChange, vaultHref, selected, onSelect, }: {
    open: boolean;
    onOpenChange: (open: boolean) => void;
    generations: Generation[];
    totalCost: number;
    typeFilter: string | null;
    onFilterChange: (type: string | null) => void;
    vaultHref?: (filePath?: string | null) => string;
    selected: Generation | null;
    onSelect: (generation: Generation | null) => void;
}): react.JSX.Element;

declare function GenerationCard({ generation, onSelect, }: {
    generation: Generation;
    onSelect: (generation: Generation) => void;
}): react.JSX.Element;
declare function GenerationStatusBadge({ generation, inline, }: {
    generation: Generation;
    inline?: boolean;
}): react.JSX.Element | null;

declare function GenerationDetail({ generation, vaultHref, onNavigate, }: {
    generation: Generation;
    vaultHref?: (filePath?: string | null) => string;
    onNavigate?: () => void;
}): react.JSX.Element;

declare function PublishPackageComposer({ caption, postDescription, mentions, cadence, selectedDestinations, connections, connectionError, connectionsLoading, integrationsHref, canManageIntegrations, onCaptionChange, onDescriptionChange, onMentionsChange, onCadenceChange, onDestinationToggle, }: {
    caption: string;
    postDescription: string;
    mentions: string;
    cadence: string;
    selectedDestinations: string[];
    connections: IntegrationConnection[];
    connectionError: Error | null;
    connectionsLoading: boolean;
    integrationsHref?: string;
    canManageIntegrations: boolean;
    onCaptionChange: (value: string) => void;
    onDescriptionChange: (value: string) => void;
    onMentionsChange: (value: string) => void;
    onCadenceChange: (value: string) => void;
    onDestinationToggle: (destination: string) => void;
}): react.JSX.Element;

interface TypeConfig {
    label: string;
    icon: typeof Image;
    color: string;
}
declare const TYPE_CONFIG: Record<string, TypeConfig>;
declare function typeConfigFor(type: string): TypeConfig;

declare function ImageComposer({ size, quality, imageCount, onSizeChange, onQualityChange, onImageCountChange, }: {
    size: string;
    quality: string;
    imageCount: number;
    onSizeChange: (value: string) => void;
    onQualityChange: (value: string) => void;
    onImageCountChange: (value: number) => void;
}): react.JSX.Element;

declare function VideoComposer({ duration, resolution, aspectRatio, referenceImageUrl, onDurationChange, onResolutionChange, onAspectRatioChange, onReferenceImageUrlChange, }: {
    duration: string;
    resolution: string;
    aspectRatio: string;
    referenceImageUrl: string;
    onDurationChange: (value: string) => void;
    onResolutionChange: (value: string) => void;
    onAspectRatioChange: (value: string) => void;
    onReferenceImageUrlChange: (value: string) => void;
}): react.JSX.Element;

declare function SpeechComposer({ voice, onVoiceChange, }: {
    voice: string;
    onVoiceChange: (value: string) => void;
}): react.JSX.Element;

declare function AvatarComposer({ audioUrl, imageUrl, avatarId, onAudioUrlChange, onImageUrlChange, onAvatarIdChange, }: {
    audioUrl: string;
    imageUrl: string;
    avatarId: string;
    onAudioUrlChange: (value: string) => void;
    onImageUrlChange: (value: string) => void;
    onAvatarIdChange: (value: string) => void;
}): react.JSX.Element;

declare function TranscriptionComposer({ audioUrl, language, onAudioUrlChange, onLanguageChange, }: {
    audioUrl: string;
    language: string;
    onAudioUrlChange: (value: string) => void;
    onLanguageChange: (value: string) => void;
}): react.JSX.Element;
declare function TranscriptionOptions({ responseFormat, temperature, onResponseFormatChange, onTemperatureChange, }: {
    responseFormat: string;
    temperature: string;
    onResponseFormatChange: (value: string) => void;
    onTemperatureChange: (value: string) => void;
}): react.JSX.Element;

export { AvatarComposer, ComposerDisclosure, ComposerHero, Field, GenerationCard, GenerationDetail, GenerationStatusBadge, ImageComposer, LibraryDrawer, NativeSelect, PublishPackageComposer, ResultCanvas, SpeechComposer, StudioHeader, type StudioRole, StudioSheet, StudioWorkspace, type StudioWorkspaceProps, TYPE_CONFIG, TranscriptionComposer, TranscriptionOptions, type TypeConfig, VideoComposer, typeConfigFor, useStudioGenerations };
