import { a as CheckParams, b as AutumnPromise, C as CheckResult, A as AttachParams, R as Result, d as CancelParams, T as TrackParams } from '../clientAttachTypes-D0_L-cnv.js';
import { A as AutumnError } from '../error-DHbclCVh.js';
import { G as GetEntityParams, E as Entity } from '../entTypes-C-7Uoct9.js';
import { A as AllowedParams } from '../handleAllowed-B8TBAzfI.js';
import * as swr from 'swr';
import '../cusTypes-DT2ujoSl.js';
import 'zod';

declare const useEntity: (entityId: string | null, params?: GetEntityParams) => {
    entity: Entity | null;
    isLoading: boolean;
    error: any;
    refetch: swr.KeyedMutator<Entity | null>;
    allowed: (params: AllowedParams) => boolean;
    check: (params: CheckParams) => AutumnPromise<CheckResult>;
    attach: (params: AttachParams) => Promise<Result<CheckResult | {
        code: string;
        message: string;
        customer_id: string;
        product_ids: string[];
        customer_data?: any;
        checkout_url?: string | undefined;
    }, AutumnError>>;
    cancel: (params: CancelParams) => AutumnPromise<{
        customer_id: string;
        success: boolean;
        product_id: string;
    }>;
    track: (params: TrackParams) => AutumnPromise<{
        code: string;
        id: string;
        customer_id: string;
        feature_id?: string | undefined;
        event_name?: string | undefined;
    }>;
};

export { useEntity };
