import { z } from "zod";
import { aO as eventTypeMetaDataSchemaWithoutApps } from "./i18n-49-r55rr.js";
import { e as eventTypeAppCardZod, c as appDataSchema$K, d as appDataSchema$L } from "./zod-9h3MdkVv.js";
import { c as appDataSchema$I } from "./zod-ObMxih_F.js";
import { b as appDataSchema$J } from "./zod-I9cQMjNL.js";
import { p as paymentOptions$1 } from "./constants--9zET2Km.js";
import { b as appDataSchema$M } from "./zod-0rSjI42F.js";
const paymentOptionSchema$3 = z.object({
  label: z.string(),
  value: z.string()
});
z.array(paymentOptionSchema$3);
const PaypalPaymentOptions$2 = [
  {
    label: "on_booking_option",
    value: "ON_BOOKING"
  }
];
const VALUES$5 = [
  PaypalPaymentOptions$2[0].value,
  ...PaypalPaymentOptions$2.slice(1).map((option) => option.value)
];
z.enum(VALUES$5);
const appDataSchema$H = eventTypeAppCardZod.merge(
  z.object({
    price: z.number(),
    currency: z.string(),
    paymentOption: z.string().optional(),
    enabled: z.boolean().optional(),
    credentialId: z.number().optional()
  })
);
z.object({
  client_id: z.string(),
  client_secret: z.string()
});
const appDataSchema$G = eventTypeAppCardZod.merge(z.object({}));
z.object({
  client_id: z.string().min(1),
  client_secret: z.string().min(1),
  user_agent: z.string().min(1)
});
const paymentOptionSchema$2 = z.object({
  label: z.string(),
  value: z.string()
});
z.array(paymentOptionSchema$2);
const BTCPayPaymentOptions = [
  {
    label: "on_booking_option",
    value: "ON_BOOKING"
  }
];
const VALUES$4 = [
  BTCPayPaymentOptions[0].value,
  ...BTCPayPaymentOptions.slice(1).map((option) => option.value)
];
z.enum(VALUES$4);
const appDataSchema$F = eventTypeAppCardZod.merge(
  z.object({
    price: z.number(),
    currency: z.string(),
    paymentOption: z.string().optional(),
    enabled: z.boolean().optional(),
    credentialId: z.number().optional()
  })
);
z.object({});
const appDataSchema$E = eventTypeAppCardZod;
z.object({
  client_id: z.string(),
  client_secret: z.string()
});
z.object({
  redirect_uris: z.string(),
  client_id: z.string(),
  client_secret: z.string()
});
const appDataSchema$D = z.object({});
const appDataSchema$C = eventTypeAppCardZod.merge(
  z.object({
    trackingId: z.string().default("").optional()
  })
);
z.object({});
const appDataSchema$B = z.object({});
z.object({
  app_id: z.string().min(1),
  app_secret: z.string().min(1),
  open_verfication_token: z.string().min(1)
});
const appDataSchema$A = eventTypeAppCardZod.merge(
  z.object({
    trackingId: z.string().default("").optional()
  })
);
z.object({});
const appDataSchema$z = eventTypeAppCardZod.merge(
  z.object({
    thankYouPage: z.string().optional()
  })
);
z.object({
  app_key: z.string().min(1)
});
const appDataSchema$y = z.object({});
z.object({
  client_id: z.string().min(1),
  client_secret: z.string().min(1),
  redirect_uris: z.union([
    z.string().url().array(),
    z.string().url().transform((url) => [url])
  ])
});
const appDataSchema$x = z.object({});
z.object({
  client_id: z.string().min(1),
  client_secret: z.string().min(1),
  redirect_uris: z.union([
    z.string().url().array(),
    z.string().url().transform((url) => [url])
  ])
});
const appDataSchema$w = eventTypeAppCardZod.merge(
  z.object({
    trackingId: z.string().transform((val) => {
      let trackingId = val.trim();
      trackingId = !trackingId.startsWith("GTM-") ? `GTM-${trackingId}` : trackingId;
      return trackingId;
    })
  })
);
z.object({});
const PaypalPaymentOptions$1 = [
  {
    label: "on_booking_option",
    value: "ON_BOOKING"
  }
];
const VALUES$3 = [
  PaypalPaymentOptions$1[0].value,
  ...PaypalPaymentOptions$1.slice(1).map((option) => option.value)
];
z.enum(VALUES$3);
const appDataSchema$v = eventTypeAppCardZod.merge(
  z.object({
    price: z.number(),
    currency: z.string(),
    paymentOption: z.string().optional(),
    enabled: z.boolean().optional()
  })
);
z.object({});
const appDataSchema$u = eventTypeAppCardZod;
z.object({
  client_id: z.string().min(1),
  client_secret: z.string().min(1)
});
const appDataSchema$t = eventTypeAppCardZod.merge(
  z.object({
    SITE_ID: z.string().optional(),
    SCRIPT_URL: z.string().optional()
  })
);
z.object({});
const appDataSchema$s = z.object({});
z.object({
  client_id: z.string(),
  client_secret: z.string()
});
const appDataSchema$r = z.object({});
z.object({
  client_id: z.string().min(1),
  client_secret: z.string().min(1)
});
z.object({
  jitsiHost: z.string().optional(),
  jitsiPathPattern: z.string().optional()
});
const appDataSchema$q = z.object({});
const appDataSchema$p = z.object({});
z.object({
  app_id: z.string().min(1),
  app_secret: z.string().min(1),
  open_verfication_token: z.string().min(1)
});
const appDataSchema$o = z.object({});
z.object({
  invite_link: z.string().min(1)
});
const appDataSchema$n = eventTypeAppCardZod.merge(
  z.object({
    MATOMO_URL: z.string().optional(),
    SITE_ID: z.string().optional()
  })
);
z.object({});
const appDataSchema$m = eventTypeAppCardZod.merge(
  z.object({
    trackingId: z.string().default("").optional()
  })
);
z.object({});
const paymentOptionSchema$1 = z.object({
  label: z.string(),
  value: z.string()
});
z.array(paymentOptionSchema$1);
const paymentOptions = [
  {
    label: "on_booking_option",
    value: "ON_BOOKING"
  }
];
const VALUES$2 = [
  paymentOptions[0].value,
  ...paymentOptions.slice(1).map((option) => option.value)
];
z.enum(VALUES$2);
const appDataSchema$l = eventTypeAppCardZod.merge(
  z.object({
    price: z.number(),
    currency: z.string(),
    paymentOption: z.string().optional(),
    enabled: z.boolean().optional()
  })
);
z.object({});
z.object({
  client_id: z.string().min(1),
  client_secret: z.string().min(1)
});
const appDataSchema$k = z.object({
  client_id: z.string(),
  client_secret: z.string()
});
z.object({
  client_id: z.string().min(1),
  client_secret: z.string().min(1)
});
const appDataSchema$j = z.object({
  client_id: z.string(),
  client_secret: z.string()
});
const paymentOptionSchema = z.object({
  label: z.string(),
  value: z.string()
});
z.array(paymentOptionSchema);
const PaypalPaymentOptions = [
  {
    label: "on_booking_option",
    value: "ON_BOOKING"
  }
  // @TODO: not required right now
  // {
  //   label: "hold_option",
  //   value: "HOLD",
  // },
];
const VALUES$1 = [
  PaypalPaymentOptions[0].value,
  ...PaypalPaymentOptions.slice(1).map((option) => option.value)
];
const paymentOptionEnum$1 = z.enum(VALUES$1);
const appDataSchema$i = eventTypeAppCardZod.merge(
  z.object({
    price: z.number(),
    currency: z.string(),
    paymentOption: z.string().optional(),
    enabled: z.boolean().optional()
  })
);
z.object({});
z.object({
  client_id: z.string().min(1),
  client_secret: z.string().min(1)
});
const appDataSchema$h = eventTypeAppCardZod;
const appDataSchema$g = eventTypeAppCardZod.merge(
  z.object({
    PLAUSIBLE_URL: z.string().optional().default("https://plausible.io/js/script.js").or(z.undefined()),
    trackingId: z.string().default("").optional()
  })
);
z.object({});
const appDataSchema$f = eventTypeAppCardZod.merge(
  z.object({
    TRACKING_ID: z.string().optional(),
    API_HOST: z.string().optional()
  })
);
z.object({});
const appDataSchema$e = eventTypeAppCardZod;
z.object({});
z.object({
  api_key: z.string(),
  api_route: z.string()
});
const appDataSchema$d = z.object({});
var RefundPolicy = /* @__PURE__ */ ((RefundPolicy2) => {
  RefundPolicy2["NEVER"] = "never";
  RefundPolicy2["ALWAYS"] = "always";
  RefundPolicy2["DAYS"] = "days";
  return RefundPolicy2;
})(RefundPolicy || {});
const VALUES = [
  paymentOptions$1[0].value,
  ...paymentOptions$1.slice(1).map((option) => option.value)
];
const paymentOptionEnum = z.enum(VALUES);
const autoChargeNoShowFeeTimeUnitEnum = z.enum(["minutes", "hours", "days"]);
const appDataSchema$c = eventTypeAppCardZod.merge(
  z.object({
    price: z.number(),
    currency: z.string(),
    paymentOption: paymentOptionEnum.optional(),
    enabled: z.boolean().optional(),
    refundPolicy: z.nativeEnum(RefundPolicy).optional(),
    refundDaysCount: z.number().optional(),
    refundCountCalendarDays: z.boolean().optional(),
    autoChargeNoShowFeeIfCancelled: z.boolean().optional(),
    autoChargeNoShowFeeTimeValue: z.number().optional(),
    autoChargeNoShowFeeTimeUnit: autoChargeNoShowFeeTimeUnitEnum.optional()
  })
);
z.object({
  client_id: z.string().startsWith("ca_").min(1),
  client_secret: z.string().startsWith("sk_").min(1),
  public_key: z.string().startsWith("pk_").min(1),
  webhook_secret: z.string().startsWith("whsec_").min(1)
});
const appDataSchema$b = z.object({});
z.object({
  client_id: z.string().min(1),
  client_secret: z.string().min(1),
  base_url: z.string().min(1)
});
const appDataSchema$a = eventTypeAppCardZod.merge(
  z.object({
    trackingId: z.string()
  })
);
z.object({});
const appDataSchema$9 = eventTypeAppCardZod.merge(
  z.object({
    isSunrise: z.boolean()
  })
);
z.object({});
const appDataSchema$8 = eventTypeAppCardZod.merge(
  z.object({
    SITE_ID: z.string().optional()
  })
);
z.object({});
const appDataSchema$7 = eventTypeAppCardZod.merge(
  z.object({
    SITE_ID: z.string().optional(),
    SCRIPT_URL: z.string().optional()
  })
);
z.object({});
const appDataSchema$6 = z.object({});
z.object({
  mode: z.string().min(1),
  region: z.string().min(1),
  api_key: z.string().min(1),
  webhook_secret: z.string().min(1)
});
const appDataSchema$5 = z.object({});
z.object({
  client_id: z.string().min(64),
  client_secret: z.string().min(64)
});
const appDataSchema$4 = eventTypeAppCardZod.merge(
  z.object({
    isSunrise: z.boolean()
  })
);
z.object({});
const appDataSchema$3 = z.object({});
z.object({
  invite_link: z.string().min(1)
});
const appKeysSchema = z.object({
  client_id: z.string().min(1),
  client_secret: z.string().min(1)
});
const appDataSchema$2 = eventTypeAppCardZod;
z.object({
  client_id: z.string().min(1),
  client_secret: z.string().min(1)
});
const appDataSchema$1 = eventTypeAppCardZod;
const appDataSchema = z.object({});
z.object({
  client_id: z.string().min(1),
  client_secret: z.string().min(1)
});
const appDataSchemas = {
  alby: appDataSchema$H,
  basecamp3: appDataSchema$G,
  btcpayserver: appDataSchema$F,
  closecom: appDataSchema$E,
  dailyvideo: appDataSchema$I,
  dub: appDataSchema$D,
  fathom: appDataSchema$C,
  feishucalendar: appDataSchema$B,
  ga4: appDataSchema$A,
  giphy: appDataSchema$z,
  googlecalendar: appDataSchema$y,
  googlevideo: appDataSchema$x,
  gtm: appDataSchema$w,
  hitpay: appDataSchema$v,
  hubspot: appDataSchema$u,
  insihts: appDataSchema$t,
  intercom: appDataSchema$s,
  jelly: appDataSchema$r,
  jitsivideo: appDataSchema$q,
  larkcalendar: appDataSchema$p,
  make: appDataSchema$o,
  matomo: appDataSchema$n,
  metapixel: appDataSchema$m,
  "mock-payment-app": appDataSchema$l,
  nextcloudtalk: appDataSchema$J,
  office365calendar: appDataSchema$k,
  office365video: appDataSchema$j,
  paypal: appDataSchema$i,
  "pipedrive-crm": appDataSchema$h,
  plausible: appDataSchema$g,
  posthog: appDataSchema$f,
  qr_code: appDataSchema$e,
  "routing-forms": appDataSchema$K,
  salesforce: appDataSchema$L,
  shimmervideo: appDataSchema$d,
  stripe: appDataSchema$c,
  tandemvideo: appDataSchema$b,
  "booking-pages-tag": appDataSchema$a,
  "event-type-app-card": appDataSchema$9,
  twipla: appDataSchema$8,
  umami: appDataSchema$7,
  vital: appDataSchema$6,
  webex: appDataSchema$5,
  wordpress: appDataSchema$4,
  zapier: appDataSchema$3,
  "zoho-bigin": appDataSchema$2,
  zohocalendar: appDataSchema$M,
  zohocrm: appDataSchema$1,
  zoomvideo: appDataSchema
};
const EventTypeAppMetadataSchema = z.object(appDataSchemas).partial();
const eventTypeAppMetadataOptionalSchema = EventTypeAppMetadataSchema.optional();
const eventTypeMetaDataSchemaWithTypedApps = eventTypeMetaDataSchemaWithoutApps.unwrap().merge(
  z.object({
    apps: eventTypeAppMetadataOptionalSchema
  })
).nullable();
export {
  EventTypeAppMetadataSchema as E,
  RefundPolicy as R,
  appKeysSchema as a,
  paymentOptionEnum as b,
  eventTypeAppMetadataOptionalSchema as c,
  eventTypeMetaDataSchemaWithTypedApps as e,
  paymentOptionEnum$1 as p
};
