import * as z from 'zod'

export const signUpSchema = z.object({
  name: z.string().min(1, 'Name is required'),
  email: z.string().email('Invalid email'),
  password: z.string().min(8, 'Must be at least 8 characters')
})

export const signInSchema = z.object({
  email: z.string().email('Invalid email'),
  password: z.string().min(8, 'Must be at least 8 characters')
})

export const organizationSchema = z.object({
  name: z.string().min(2, 'Too short'),
  slug: z.string().min(2, 'Too short'),
  logo: z.string().optional()
})

export type SignUpSchema = z.output<typeof signUpSchema>
export type SignInSchema = z.output<typeof signInSchema>
export type OrganizationSchema = z.output<typeof organizationSchema>
