import { object, string, email, minLength, optional, picklist } from "valibot";

export const UpdateUserSchema = object({
  name: optional(string([minLength(1)])),
  email: optional(string([email()])),
  image: optional(string()),
});

export const InviteMemberSchema = object({
  email: string([email()]),
  role: optional(picklist(["admin", "member"]), "member"),
});

export const RemoveMemberSchema = object({
  userId: string(),
});

export const UpdateRoleSchema = object({
  userId: string(),
  role: picklist(["owner", "admin", "member"]),
});
