import { string, boolean, number, object, mixed } from "yup";
export const schema = object({
    lat: number()
        .min(-90, "Must be a valid latitude.")
        .max(90, "Must be a valid latitude.")
        .when("geographyId", {
        is: (geographyId) => typeof geographyId === "string",
        then: (fieldSchema) => fieldSchema.optional(),
        otherwise: (fieldSchema) => fieldSchema.required(),
    }),
    lng: number()
        .min(-180, "Must be a valid longitude.")
        .max(180, "Must be a valid longitude.")
        .when("geographyId", {
        is: (geographyId) => typeof geographyId === "string",
        then: (fieldSchema) => fieldSchema.optional(),
        otherwise: (fieldSchema) => fieldSchema.required(),
    }),
    geographyId: string().optional(),
    title: mixed().optional(),
    hideAttribution: boolean().optional(),
    omitTabs: mixed().optional(),
    appearance: object({
        colors: object({
            buyerColor: string().optional(),
            sellerColor: string().optional(),
            decreaseColor: string().optional(),
            neutralColor: string().optional(),
            increaseColor: string().optional(),
        }).optional(),
    }).optional(),
}).noUnknown(true);
//# sourceMappingURL=schema.js.map