import type { z } from "zod";
import type { PrismaClient } from '../../../prisma';
import type { Prisma } from '../../../prisma/client';
import type { TrpcSessionUser } from '../../../trpc/server/types';
import type { zodFields, zodRoutes } from "../zod";
import type { TFormSchema } from "./forms.schema";
interface FormsHandlerOptions {
    ctx: {
        prisma: PrismaClient;
        user: NonNullable<TrpcSessionUser>;
    };
    input: TFormSchema;
}
export declare const formsHandler: ({ ctx, input }: FormsHandlerOptions) => Promise<{
    filtered: ({
        hasError: boolean;
        form: Omit<{
            team: {
                name: string;
                id: number;
            } | null;
            _count: {
                responses: number;
            };
        } & {
            settings: Prisma.JsonValue;
            name: string;
            id: string;
            description: string | null;
            disabled: boolean;
            userId: number;
            fields: Prisma.JsonValue;
            routes: Prisma.JsonValue;
            position: number;
            teamId: number | null;
            createdAt: Date;
            updatedAt: Date;
            updatedById: number | null;
        }, "settings" | "fields" | "routes" | "createdAt" | "updatedAt"> & {
            routes: import("../types/types").Routes;
            fields: import("../types/types").Fields;
            settings: z.TypeOf<typeof import('../../../prisma/zod-utils').RoutingFormSettings>;
            createdAt: string;
            updatedAt: string;
            connectedForms: {
                name: string;
                description: string | null;
                id: string;
            }[];
            routers: {
                name: string;
                description: string | null;
                id: string;
            }[];
            teamMembers: import("../types/types").SerializableFormTeamMembers[];
        };
        readOnly: boolean;
    } | {
        form: {
            routes: z.infer<typeof zodRoutes>;
            fields: z.infer<typeof zodFields>;
            team: {
                name: string;
                id: number;
            } | null;
            _count: {
                responses: number;
            };
            settings: Prisma.JsonValue;
            name: string;
            id: string;
            description: string | null;
            disabled: boolean;
            userId: number;
            position: number;
            teamId: number | null;
            createdAt: Date;
            updatedAt: Date;
            updatedById: number | null;
        };
        readOnly: boolean;
        hasError: boolean;
    })[];
    totalCount: number;
}>;
export default formsHandler;
type SupportedFilters = Omit<NonNullable<NonNullable<TFormSchema>["filters"]>, "upIds"> | undefined;
export declare function getPrismaWhereFromFilters(user: {
    id: number;
}, filters: SupportedFilters): {
    OR: Prisma.App_RoutingForms_FormWhereInput[];
};
//# sourceMappingURL=forms.handler.d.ts.map