'use strict';

var zod = require('zod');

// src/schemas/contact-schema.ts
var companySizeOptions = [
  "1-10",
  "11-50",
  "51-200",
  "201-500",
  "501-1000",
  "1001+"
];
var referralSourceOptions = [
  "Google",
  "LinkedIn",
  "Twitter/X",
  "Reddit",
  "Friend / Colleague",
  "Other"
];
var defaultHelpCategoryOptions = [
  "Open-Source Alternatives",
  "Vendor Cost Reduction",
  "MSP Best Practices",
  "Partnerships",
  "Press",
  "Other"
];
var LinkedInUrlSchema = zod.z.string().url({ message: "Please enter a valid LinkedIn URL" }).refine(
  (url) => {
    try {
      const host = new URL(url).hostname.toLowerCase();
      return host === "linkedin.com" || host.endsWith(".linkedin.com");
    } catch {
      return false;
    }
  },
  {
    message: "Please enter a valid LinkedIn profile URL"
  }
).optional().or(zod.z.literal(""));
var ContactBaseSchema = zod.z.object({
  name: zod.z.string().min(2, { message: "Name must be at least 2 characters" }).max(255, { message: "Name is too long" }),
  email: zod.z.string().email({ message: "Please enter a valid email address" }).max(255),
  linkedin_url: LinkedInUrlSchema,
  helpCategory: zod.z.string().min(1, { message: "Please select what we can help you with" }).max(255, { message: "Help category is too long" }),
  message: zod.z.string().min(10, { message: "Message must be at least 10 characters" }).max(5e3, { message: "Message is too long (5,000 character limit)" }),
  rdt_cid: zod.z.string().optional()
});
var ContactSchema = ContactBaseSchema.extend({
  companySize: zod.z.string().optional().refine((val) => !val || companySizeOptions.includes(val), {
    message: "Please select a valid company size"
  }),
  referralSource: zod.z.string().optional().refine((val) => !val || referralSourceOptions.includes(val), {
    message: "Please select a valid referral source"
  })
});

exports.ContactBaseSchema = ContactBaseSchema;
exports.ContactSchema = ContactSchema;
exports.LinkedInUrlSchema = LinkedInUrlSchema;
exports.companySizeOptions = companySizeOptions;
exports.defaultHelpCategoryOptions = defaultHelpCategoryOptions;
exports.referralSourceOptions = referralSourceOptions;
//# sourceMappingURL=contact-schema.cjs.map
//# sourceMappingURL=contact-schema.cjs.map