import { z } from 'zod';
import { ZCreateLocalizationBody } from './localization.js';
import { SubscriptionStatus } from './profile-plans.js';
export var ProfileType;
(function (ProfileType) {
    ProfileType["SELF_SIGN_UP"] = "SELF_SIGN_UP";
    ProfileType["TOP_TALENT"] = "TOP_TALENT";
})(ProfileType || (ProfileType = {}));
export const ZHandle = z
    .string()
    .max(50)
    .regex(new RegExp(/^[a-z0-9]([a-z0-9-]+)?[a-z0-9]$/gim));
export const ZProfile = z.object({
    handle: ZHandle,
    id: z.string(),
    type: z.nativeEnum(ProfileType)
});
export const ZProfileHandleBody = z.object({
    handle: ZHandle
});
export const ZProfileHandleParam = ZProfileHandleBody;
export const ZProfileBody = ZProfile;
export const ZProfileWithInvite = ZProfile.extend({
    isPending: z.boolean().optional()
});
export const ZCreateProfileBody = z.object({
    category: z.object({
        id: z.number().optional(),
        name: z.string()
    }),
    createdVia: z.string(),
    currency: z.string().default('usd'),
    displayName: z.string(),
    handle: ZHandle,
    profileId: z.string().nullable().optional()
});
export const ZCreateLegacyProfileBody = z.object({
    category: z.object({
        id: z.number().optional(),
        name: z.string()
    }),
    countryCode: z.string(),
    createdVia: z.string(),
    currency: z.string(),
    displayName: z.string().optional().nullable(),
    handle: ZHandle,
    isActive: z.boolean(),
    isLocalizationEnabled: z.boolean(),
    localizationId: z.string().min(1),
    localizationName: z.string().min(1),
    localizations: z.array(ZCreateLocalizationBody),
    ssx: z.boolean(),
    status: z.string(),
    subscriptionStatus: z.nativeEnum(SubscriptionStatus).optional()
});
export const ZProfileIdParam = z.object({
    profileId: z.string().uuid()
});
export const ZPublishProfileBody = z.object({
    localizations: z.array(z.string().uuid())
});
