export const PRODUCT = {
  name: 'AIPROS Lite',
  fullName: 'AIPROS Lite · Skill 管理模板',
  shortName: 'AIPROS',
  subtitle: '流程架构驱动的 Skill 管理平台',
  poweredBy: 'Powered by AIPROS Lite',
  logoAccent: 'S',
  modules: {
    skills: true,
    upload: true,
    aiCreate: true,
    apiAccess: true,
    operations: true,
    governance: true,
    architecture: true,
    llmSettings: true,
    knowledge: false,
    aiFlowDrawing: false,
    legacyFormCreate: false,
  },
  superAdmins: [
    { email: '494161546@qq.com', phone: '13136092523' },
  ],
}

export function isSuperAdminUser(user) {
  if (!user) return false
  return PRODUCT.superAdmins.some(admin => (
    (admin.email && user.email === admin.email) ||
    (admin.phone && user.phone === admin.phone)
  ))
}

export function isAdminUser(user) {
  return user?.role === 'admin' || isSuperAdminUser(user)
}
