import { EntityDataParams } from './clientEntTypes.mjs';

interface AttachFeatureOptions {
    featureId: string;
    quantity: number;
}
interface AttachParams {
    productId?: string;
    entityId?: string;
    options?: AttachFeatureOptions[];
    productIds?: string[];
    freeTrial?: boolean;
    successUrl?: string;
    metadata?: Record<string, string>;
    forceCheckout?: boolean;
    dialog?: (data: any) => JSX.Element | React.ReactNode;
    callback?: () => Promise<void> | void;
    entityData?: EntityDataParams;
    openInNewTab?: boolean;
    reward?: string;
}
interface CancelParams {
    productId: string;
    entityId?: string;
    cancelImmediately?: boolean;
}
interface CheckParams {
    featureId?: string;
    productId?: string;
    entityId?: string;
    requiredBalance?: number;
    sendEvent?: boolean;
    withPreview?: "formatted" | "raw";
    dialog?: (data: any) => JSX.Element | React.ReactNode;
    entityData?: EntityDataParams;
}
interface TrackParams {
    featureId?: string;
    eventName?: string;
    entityId?: string;
    value?: number;
    idempotencyKey?: string;
    entityData?: EntityDataParams;
}
interface OpenBillingPortalParams {
    returnUrl?: string;
}

export type { AttachFeatureOptions, AttachParams, CancelParams, CheckParams, OpenBillingPortalParams, TrackParams };
