// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.

/**
 * Auto-generated by 'os i18n extract' for locale 'en'.
 * Edit translations in place; re-run extract (with --merge) to fill new gaps.
 * Do not hand-edit the structure — only the leaf string values.
 */

import type { TranslationData } from '@objectstack/spec/system';

export const enObjects: NonNullable<TranslationData['objects']> = {
  sys_role: {
    label: "Role",
    pluralLabel: "Roles",
    description: "Role definitions for RBAC access control",
    fields: {
      label: {
        label: "Display Name"
      },
      name: {
        label: "API Name",
        help: "Unique machine name for the role (e.g. admin, editor, viewer)"
      },
      description: {
        label: "Description"
      },
      permissions: {
        label: "Permissions",
        help: "JSON-serialized array of permission strings"
      },
      active: {
        label: "Active"
      },
      is_default: {
        label: "Default Role",
        help: "Automatically assigned to new users"
      },
      id: {
        label: "Role ID"
      },
      created_at: {
        label: "Created At"
      },
      updated_at: {
        label: "Updated At"
      }
    },
    _views: {
      active: {
        label: "Active"
      },
      default_roles: {
        label: "Default"
      },
      custom: {
        label: "Custom"
      },
      all_roles: {
        label: "All"
      }
    },
    _actions: {
      activate_role: {
        label: "Activate Role",
        successMessage: "Role activated"
      },
      deactivate_role: {
        label: "Deactivate Role",
        confirmText: "Deactivate this role? Users with the role keep their assignment but the role stops granting permissions until re-activated.",
        successMessage: "Role deactivated"
      },
      set_default_role: {
        label: "Set as Default",
        confirmText: "Make this the default role for new users? Existing users are unaffected.",
        successMessage: "Default role updated"
      },
      clone_role: {
        label: "Clone Role",
        successMessage: "Role cloned"
      }
    }
  },
  sys_permission_set: {
    label: "Permission Set",
    pluralLabel: "Permission Sets",
    description: "Named permission groupings for fine-grained access control",
    fields: {
      label: {
        label: "Display Name"
      },
      name: {
        label: "API Name",
        help: "Unique machine name for the permission set"
      },
      description: {
        label: "Description"
      },
      object_permissions: {
        label: "Object Permissions",
        help: "JSON-serialized object-level CRUD permissions"
      },
      field_permissions: {
        label: "Field Permissions",
        help: "JSON-serialized field-level read/write permissions"
      },
      system_permissions: {
        label: "System Permissions",
        help: "JSON-serialized array of system capability names (e.g. [\"setup.access\",\"studio.access\",\"manage_users\"])"
      },
      row_level_security: {
        label: "Row-Level Security",
        help: "JSON-serialized array of row-level security policies (USING/CHECK clauses)"
      },
      tab_permissions: {
        label: "Tab Permissions",
        help: "JSON-serialized map of app tab visibility (visible | hidden | default_on | default_off)"
      },
      active: {
        label: "Active"
      },
      id: {
        label: "Permission Set ID"
      },
      created_at: {
        label: "Created At"
      },
      updated_at: {
        label: "Updated At"
      }
    },
    _views: {
      active: {
        label: "Active"
      },
      inactive: {
        label: "Inactive"
      },
      all_permsets: {
        label: "All"
      }
    },
    _actions: {
      activate_permission_set: {
        label: "Activate",
        successMessage: "Permission set activated"
      },
      deactivate_permission_set: {
        label: "Deactivate",
        confirmText: "Deactivate this permission set? Existing assignments stay in place but stop granting access until re-activated.",
        successMessage: "Permission set deactivated"
      },
      clone_permission_set: {
        label: "Clone",
        successMessage: "Permission set cloned"
      }
    }
  },
  sys_user_permission_set: {
    label: "User Permission Set",
    pluralLabel: "User Permission Sets",
    description: "Direct assignment of a permission set to a user (optionally scoped to an organization).",
    fields: {
      id: {
        label: "Assignment ID",
        help: "UUID of the assignment."
      },
      user_id: {
        label: "User",
        help: "Foreign key to sys_user."
      },
      permission_set_id: {
        label: "Permission Set",
        help: "Foreign key to sys_permission_set."
      },
      organization_id: {
        label: "Organization",
        help: "Optional organization scope. NULL = applies in every org context."
      },
      granted_by: {
        label: "Granted By",
        help: "User who granted this permission set."
      },
      created_at: {
        label: "Created At"
      },
      updated_at: {
        label: "Updated At"
      }
    }
  },
  sys_role_permission_set: {
    label: "Role Permission Set",
    pluralLabel: "Role Permission Sets",
    description: "Binds a permission set to a role.",
    fields: {
      id: {
        label: "Binding ID",
        help: "UUID of the role-permission-set binding."
      },
      role_id: {
        label: "Role",
        help: "Foreign key to sys_role."
      },
      permission_set_id: {
        label: "Permission Set",
        help: "Foreign key to sys_permission_set."
      },
      created_at: {
        label: "Created At"
      },
      updated_at: {
        label: "Updated At"
      }
    }
  }
};
