/**
 * Theme configuration for a site; stores design tokens, colors, and typography as JSONB
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
import { useQuery } from '@tanstack/react-query';
import { getClient } from '../client';
import { buildListSelectionArgs } from '../selection';
import { siteThemeKeys } from '../query-keys';
/** Query key factory - re-exported from query-keys.ts */
export const siteThemesQueryKey = siteThemeKeys.list;
export function useSiteThemesQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    const { selection: _selection, ...queryOptions } = params ?? {};
    void _selection;
    return useQuery({
        queryKey: siteThemeKeys.list(args),
        queryFn: () => getClient().siteTheme.findMany(args).unwrap(),
        ...queryOptions,
    });
}
export async function fetchSiteThemesQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    return getClient().siteTheme.findMany(args).unwrap();
}
export async function prefetchSiteThemesQuery(queryClient, params) {
    const args = buildListSelectionArgs(params.selection);
    await queryClient.prefetchQuery({
        queryKey: siteThemeKeys.list(args),
        queryFn: () => getClient().siteTheme.findMany(args).unwrap(),
    });
}
