export type SettingsTabType = "company" | "users" | "roles" | "preferences";

export interface CompanyProfile {
  id: string;
  legalName: string;
  tradeName: string;
  document: string;
  stateRegistration?: string | null;
  email: string;
  phone?: string | null;
  logoUrl?: string | null;
  zipCode?: string | null;
  street?: string | null;
  number?: string | null;
  complement?: string | null;
  district?: string | null;
  city?: string | null;
  state?: string | null;
}

export interface UserProfile {
  id: string;
  name: string;
  email: string;
  role: "OWNER" | "ADMIN" | "MANAGER" | "FINANCE" | "OPERATIONS" | "VIEWER";
  roleName?: string;
  active: boolean;
  avatarUrl?: string | null;
  createdAt: string;
  password?: string;
}

export interface ModulePermission {
  moduleKey: string;
  moduleName: string;
  canView: boolean;
  canCreate: boolean;
  canEdit: boolean;
  canDelete: boolean;
}

export interface RoleGroup {
  id: string;
  name: string;
  description: string;
  isSystemDefault?: boolean;
  permissions: ModulePermission[];
}

export interface SystemPreferences {
  defaultCurrency: string;
  contractTermsFooter: string;
  enableEmailAlerts: boolean;
  autoBackupDaily: boolean;
}
