import * as React from 'react';
import { ListMetadata, CreateOrganizationApiKeyResponse } from '../../api/endpoint.cjs';
import '@tanstack/react-query';
import '../../api/widgets-api-client.cjs';

declare function useApiKeysState(initialState: ApiKeysState): readonly [ApiKeysState, React.ActionDispatch<[action: ApiKeysAction]>];
interface ApiKeysState {
    searchQuery: string | null;
    pagination: ListMetadata | null;
    createDialogOpen: boolean;
    createdApiKey: CreateOrganizationApiKeyResponse | null;
}
type ApiKeysAction = {
    type: "INIT";
    params: URLSearchParams;
} | {
    type: "FILTER_BY_SEARCH";
    searchQuery: string | null;
} | {
    type: "SET_PAGINATION";
    pagination: ListMetadata;
} | {
    type: "OPEN_CREATE_DIALOG";
} | {
    type: "CLOSE_CREATE_DIALOG";
} | {
    type: "SET_CREATED_API_KEY";
    apiKey: CreateOrganizationApiKeyResponse;
};

export { type ApiKeysAction, type ApiKeysState, useApiKeysState };
