"use strict";
const z = require("zod");
const index = require("./i18n-HHdcQbuJ.cjs");
const zod = require("./zod-AYpgycup.cjs");
const zod$1 = require("./zod-QiYvymJ1.cjs");
const zod$2 = require("./zod-h2jMo9ue.cjs");
const constants = require("./constants-aXrI-vVO.cjs");
const zod$3 = require("./zod-5gXxWgvM.cjs");
const paymentOptionSchema$3 = z.z.object({
  label: z.z.string(),
  value: z.z.string()
});
z.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.z.enum(VALUES$5);
const appDataSchema$H = zod.eventTypeAppCardZod.merge(
  z.z.object({
    price: z.z.number(),
    currency: z.z.string(),
    paymentOption: z.z.string().optional(),
    enabled: z.z.boolean().optional(),
    credentialId: z.z.number().optional()
  })
);
z.z.object({
  client_id: z.z.string(),
  client_secret: z.z.string()
});
const appDataSchema$G = zod.eventTypeAppCardZod.merge(z.z.object({}));
z.z.object({
  client_id: z.z.string().min(1),
  client_secret: z.z.string().min(1),
  user_agent: z.z.string().min(1)
});
const paymentOptionSchema$2 = z.z.object({
  label: z.z.string(),
  value: z.z.string()
});
z.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.z.enum(VALUES$4);
const appDataSchema$F = zod.eventTypeAppCardZod.merge(
  z.z.object({
    price: z.z.number(),
    currency: z.z.string(),
    paymentOption: z.z.string().optional(),
    enabled: z.z.boolean().optional(),
    credentialId: z.z.number().optional()
  })
);
z.z.object({});
const appDataSchema$E = zod.eventTypeAppCardZod;
z.z.object({
  client_id: z.z.string(),
  client_secret: z.z.string()
});
z.z.object({
  redirect_uris: z.z.string(),
  client_id: z.z.string(),
  client_secret: z.z.string()
});
const appDataSchema$D = z.z.object({});
const appDataSchema$C = zod.eventTypeAppCardZod.merge(
  z.z.object({
    trackingId: z.z.string().default("").optional()
  })
);
z.z.object({});
const appDataSchema$B = z.z.object({});
z.z.object({
  app_id: z.z.string().min(1),
  app_secret: z.z.string().min(1),
  open_verfication_token: z.z.string().min(1)
});
const appDataSchema$A = zod.eventTypeAppCardZod.merge(
  z.z.object({
    trackingId: z.z.string().default("").optional()
  })
);
z.z.object({});
const appDataSchema$z = zod.eventTypeAppCardZod.merge(
  z.z.object({
    thankYouPage: z.z.string().optional()
  })
);
z.z.object({
  app_key: z.z.string().min(1)
});
const appDataSchema$y = z.z.object({});
z.z.object({
  client_id: z.z.string().min(1),
  client_secret: z.z.string().min(1),
  redirect_uris: z.z.union([
    z.z.string().url().array(),
    z.z.string().url().transform((url) => [url])
  ])
});
const appDataSchema$x = z.z.object({});
z.z.object({
  client_id: z.z.string().min(1),
  client_secret: z.z.string().min(1),
  redirect_uris: z.z.union([
    z.z.string().url().array(),
    z.z.string().url().transform((url) => [url])
  ])
});
const appDataSchema$w = zod.eventTypeAppCardZod.merge(
  z.z.object({
    trackingId: z.z.string().transform((val) => {
      let trackingId = val.trim();
      trackingId = !trackingId.startsWith("GTM-") ? `GTM-${trackingId}` : trackingId;
      return trackingId;
    })
  })
);
z.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.z.enum(VALUES$3);
const appDataSchema$v = zod.eventTypeAppCardZod.merge(
  z.z.object({
    price: z.z.number(),
    currency: z.z.string(),
    paymentOption: z.z.string().optional(),
    enabled: z.z.boolean().optional()
  })
);
z.z.object({});
const appDataSchema$u = zod.eventTypeAppCardZod;
z.z.object({
  client_id: z.z.string().min(1),
  client_secret: z.z.string().min(1)
});
const appDataSchema$t = zod.eventTypeAppCardZod.merge(
  z.z.object({
    SITE_ID: z.z.string().optional(),
    SCRIPT_URL: z.z.string().optional()
  })
);
z.z.object({});
const appDataSchema$s = z.z.object({});
z.z.object({
  client_id: z.z.string(),
  client_secret: z.z.string()
});
const appDataSchema$r = z.z.object({});
z.z.object({
  client_id: z.z.string().min(1),
  client_secret: z.z.string().min(1)
});
z.z.object({
  jitsiHost: z.z.string().optional(),
  jitsiPathPattern: z.z.string().optional()
});
const appDataSchema$q = z.z.object({});
const appDataSchema$p = z.z.object({});
z.z.object({
  app_id: z.z.string().min(1),
  app_secret: z.z.string().min(1),
  open_verfication_token: z.z.string().min(1)
});
const appDataSchema$o = z.z.object({});
z.z.object({
  invite_link: z.z.string().min(1)
});
const appDataSchema$n = zod.eventTypeAppCardZod.merge(
  z.z.object({
    MATOMO_URL: z.z.string().optional(),
    SITE_ID: z.z.string().optional()
  })
);
z.z.object({});
const appDataSchema$m = zod.eventTypeAppCardZod.merge(
  z.z.object({
    trackingId: z.z.string().default("").optional()
  })
);
z.z.object({});
const paymentOptionSchema$1 = z.z.object({
  label: z.z.string(),
  value: z.z.string()
});
z.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.z.enum(VALUES$2);
const appDataSchema$l = zod.eventTypeAppCardZod.merge(
  z.z.object({
    price: z.z.number(),
    currency: z.z.string(),
    paymentOption: z.z.string().optional(),
    enabled: z.z.boolean().optional()
  })
);
z.z.object({});
z.z.object({
  client_id: z.z.string().min(1),
  client_secret: z.z.string().min(1)
});
const appDataSchema$k = z.z.object({
  client_id: z.z.string(),
  client_secret: z.z.string()
});
z.z.object({
  client_id: z.z.string().min(1),
  client_secret: z.z.string().min(1)
});
const appDataSchema$j = z.z.object({
  client_id: z.z.string(),
  client_secret: z.z.string()
});
const paymentOptionSchema = z.z.object({
  label: z.z.string(),
  value: z.z.string()
});
z.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.z.enum(VALUES$1);
const appDataSchema$i = zod.eventTypeAppCardZod.merge(
  z.z.object({
    price: z.z.number(),
    currency: z.z.string(),
    paymentOption: z.z.string().optional(),
    enabled: z.z.boolean().optional()
  })
);
z.z.object({});
z.z.object({
  client_id: z.z.string().min(1),
  client_secret: z.z.string().min(1)
});
const appDataSchema$h = zod.eventTypeAppCardZod;
const appDataSchema$g = zod.eventTypeAppCardZod.merge(
  z.z.object({
    PLAUSIBLE_URL: z.z.string().optional().default("https://plausible.io/js/script.js").or(z.z.undefined()),
    trackingId: z.z.string().default("").optional()
  })
);
z.z.object({});
const appDataSchema$f = zod.eventTypeAppCardZod.merge(
  z.z.object({
    TRACKING_ID: z.z.string().optional(),
    API_HOST: z.z.string().optional()
  })
);
z.z.object({});
const appDataSchema$e = zod.eventTypeAppCardZod;
z.z.object({});
z.z.object({
  api_key: z.z.string(),
  api_route: z.z.string()
});
const appDataSchema$d = z.z.object({});
var RefundPolicy = /* @__PURE__ */ ((RefundPolicy2) => {
  RefundPolicy2["NEVER"] = "never";
  RefundPolicy2["ALWAYS"] = "always";
  RefundPolicy2["DAYS"] = "days";
  return RefundPolicy2;
})(RefundPolicy || {});
const VALUES = [
  constants.paymentOptions[0].value,
  ...constants.paymentOptions.slice(1).map((option) => option.value)
];
const paymentOptionEnum = z.z.enum(VALUES);
const autoChargeNoShowFeeTimeUnitEnum = z.z.enum(["minutes", "hours", "days"]);
const appDataSchema$c = zod.eventTypeAppCardZod.merge(
  z.z.object({
    price: z.z.number(),
    currency: z.z.string(),
    paymentOption: paymentOptionEnum.optional(),
    enabled: z.z.boolean().optional(),
    refundPolicy: z.z.nativeEnum(RefundPolicy).optional(),
    refundDaysCount: z.z.number().optional(),
    refundCountCalendarDays: z.z.boolean().optional(),
    autoChargeNoShowFeeIfCancelled: z.z.boolean().optional(),
    autoChargeNoShowFeeTimeValue: z.z.number().optional(),
    autoChargeNoShowFeeTimeUnit: autoChargeNoShowFeeTimeUnitEnum.optional()
  })
);
z.z.object({
  client_id: z.z.string().startsWith("ca_").min(1),
  client_secret: z.z.string().startsWith("sk_").min(1),
  public_key: z.z.string().startsWith("pk_").min(1),
  webhook_secret: z.z.string().startsWith("whsec_").min(1)
});
const appDataSchema$b = z.z.object({});
z.z.object({
  client_id: z.z.string().min(1),
  client_secret: z.z.string().min(1),
  base_url: z.z.string().min(1)
});
const appDataSchema$a = zod.eventTypeAppCardZod.merge(
  z.z.object({
    trackingId: z.z.string()
  })
);
z.z.object({});
const appDataSchema$9 = zod.eventTypeAppCardZod.merge(
  z.z.object({
    isSunrise: z.z.boolean()
  })
);
z.z.object({});
const appDataSchema$8 = zod.eventTypeAppCardZod.merge(
  z.z.object({
    SITE_ID: z.z.string().optional()
  })
);
z.z.object({});
const appDataSchema$7 = zod.eventTypeAppCardZod.merge(
  z.z.object({
    SITE_ID: z.z.string().optional(),
    SCRIPT_URL: z.z.string().optional()
  })
);
z.z.object({});
const appDataSchema$6 = z.z.object({});
z.z.object({
  mode: z.z.string().min(1),
  region: z.z.string().min(1),
  api_key: z.z.string().min(1),
  webhook_secret: z.z.string().min(1)
});
const appDataSchema$5 = z.z.object({});
z.z.object({
  client_id: z.z.string().min(64),
  client_secret: z.z.string().min(64)
});
const appDataSchema$4 = zod.eventTypeAppCardZod.merge(
  z.z.object({
    isSunrise: z.z.boolean()
  })
);
z.z.object({});
const appDataSchema$3 = z.z.object({});
z.z.object({
  invite_link: z.z.string().min(1)
});
const appKeysSchema = z.z.object({
  client_id: z.z.string().min(1),
  client_secret: z.z.string().min(1)
});
const appDataSchema$2 = zod.eventTypeAppCardZod;
z.z.object({
  client_id: z.z.string().min(1),
  client_secret: z.z.string().min(1)
});
const appDataSchema$1 = zod.eventTypeAppCardZod;
const appDataSchema = z.z.object({});
z.z.object({
  client_id: z.z.string().min(1),
  client_secret: z.z.string().min(1)
});
const appDataSchemas = {
  alby: appDataSchema$H,
  basecamp3: appDataSchema$G,
  btcpayserver: appDataSchema$F,
  closecom: appDataSchema$E,
  dailyvideo: zod$1.appDataSchema,
  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: zod$2.appDataSchema,
  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": zod.appDataSchema,
  salesforce: zod.appDataSchema$1,
  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: zod$3.appDataSchema,
  zohocrm: appDataSchema$1,
  zoomvideo: appDataSchema
};
const EventTypeAppMetadataSchema = z.z.object(appDataSchemas).partial();
const eventTypeAppMetadataOptionalSchema = EventTypeAppMetadataSchema.optional();
const eventTypeMetaDataSchemaWithTypedApps = index.eventTypeMetaDataSchemaWithoutApps.unwrap().merge(
  z.z.object({
    apps: eventTypeAppMetadataOptionalSchema
  })
).nullable();
exports.EventTypeAppMetadataSchema = EventTypeAppMetadataSchema;
exports.RefundPolicy = RefundPolicy;
exports.appKeysSchema = appKeysSchema;
exports.eventTypeAppMetadataOptionalSchema = eventTypeAppMetadataOptionalSchema;
exports.eventTypeMetaDataSchemaWithTypedApps = eventTypeMetaDataSchemaWithTypedApps;
exports.paymentOptionEnum = paymentOptionEnum$1;
exports.paymentOptionEnum$1 = paymentOptionEnum;
