data:
  route:
    - url: /auth/verify
      method: GET
    - url: /menu/system
      method: GET
    - url: /menu
      method: GET
    - url: /menu/:menuId/role
      method: GET
    - url: /menu/:menuId/screen
      method: GET
    - url: /menu/:menuId/role
      method: PATCH
    - url: /menu/:menuId/screen
      method: PATCH
    - url: /menu/:menuId
      method: GET
    - url: /menu
      method: POST
    - url: /menu/:menuId
      method: PATCH
    - url: /menu
      method: DELETE
    - url: /menu/order
      method: PATCH
    - url: /role
      method: GET
    - url: /role/:roleId/user
      method: GET
    - url: /role/:roleId/menu
      method: GET
    - url: /role/:roleId/route
      method: GET
    - url: /role/:roleId/screen
      method: GET
    - url: /role/:roleId/user
      method: PATCH
    - url: /role/:roleId/menu
      method: PATCH
    - url: /role/:roleId/route
      method: PATCH
    - url: /role/:roleId/screen
      method: PATCH
    - url: /role/:roleId
      method: GET
    - url: /role
      method: POST
    - url: /role/:roleId
      method: PATCH
    - url: /role
      method: DELETE
    - url: /route
      method: GET
    - url: /route/:routeId
      method: GET
    - url: /route
      method: POST
    - url: /route/:routeId
      method: PATCH
    - url: /route
      method: DELETE
    - url: /route/:routeId/role
      method: GET
    - url: /route/:routeId/role
      method: PATCH
    - url: /route/:routeId/screen
      method: GET
    - url: /route/:routeId/screen
      method: PATCH
    - url: /screen
      method: GET
    - url: /screen/:screenId/role
      method: GET
    - url: /screen/:screenId/route
      method: GET
    - url: /screen/:screenId/role
      method: PATCH
    - url: /screen/:screenId/route
      method: PATCH
    - url: /screen/:screenId
      method: GET
    - url: /screen
      method: POST
    - url: /screen/:screenId
      method: PATCH
    - url: /screen
      method: DELETE
    - url: /user
      method: GET
    - url: /user/:userId/role
      method: GET
    - url: /user/:userId/role
      method: PATCH
    - url: /user/:userId
      method: GET
    - url: /user
      method: POST
    - url: /user/:userId
      method: PATCH
    - url: /user
      method: DELETE
    - url: /locale
      method: GET
    - url: /locale/:localeId
      method: GET
    - url: /locale
      method: POST
    - url: /locale
      method: PUT
    - url: /locale/:localeId
      method: PATCH
    - url: /locale
      method: DELETE
    - url: /file
      method: GET
    - url: /file/:id
      method: GET
    - url: /file/download/:token
      method: GET
    - url: /file/download/:id
      method: PUT
    - url: /file
      method: POST
    - url: /file
      method: DELETE
    - url: /translation-namespace
      method: GET
      relations: &a1
        role:
          - where:
              slug: admin
    - url: /translation-namespace
      method: POST
      relations: *a1
    - url: /translation-namespace/:id
      method: GET
      relations: *a1
    - url: /translation-namespace/:id
      method: PATCH
      relations: *a1
    - url: /translation-namespace
      method: DELETE
      relations: *a1
    - url: /translation
      method: GET
      relations: &a2
        role:
          - where:
              slug: admin
    - url: /translation
      method: POST
      relations: *a2
    - url: /translation/:id
      method: GET
      relations: *a2
    - url: /translation/:id
      method: PATCH
      relations: *a2
    - url: /translation
      method: DELETE
      relations: *a2
    - url: /multifactor
      method: GET
      relations: &a3
        role:
          - where:
              slug: admin
    - url: /multifactor
      method: POST
      relations: *a3
    - url: /multifactor/:id
      method: GET
      relations: *a3
    - url: /multifactor/:id
      method: PATCH
      relations: *a3
    - url: /multifactor
      method: DELETE
      relations: *a3
    - url: /user/:id
      method: GET
      relations: &a4
        role:
          - where:
              slug: admin
    - url: /user/:id
      method: PATCH
      relations: *a4
    - url: /screen/:id
      method: GET
      relations: &a5
        role:
          - where:
              slug: admin
    - url: /screen/:id
      method: PATCH
      relations: *a5
    - url: /menu/:id
      method: GET
      relations: &a6
        role:
          - where:
              slug: admin
    - url: /menu/:id
      method: PATCH
      relations: *a6
    - url: /menu-screen
      method: GET
      relations: &a7
        role:
          - where:
              slug: admin
    - url: /menu-screen
      method: POST
      relations: *a7
    - url: /menu-screen/:menu_id
      method: GET
      relations: *a7
    - url: /menu-screen/:menu_id
      method: PATCH
      relations: *a7
    - url: /menu-screen
      method: DELETE
      relations: *a7
    - url: /dashboard
      method: GET
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard
      method: POST
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard/:id
      method: GET
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard/:id
      method: PATCH
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard
      method: DELETE
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-component
      method: GET
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-component
      method: POST
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-component/:id
      method: GET
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-component/:id
      method: PATCH
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-component
      method: DELETE
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-item
      method: GET
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-item
      method: POST
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-item/:id
      method: GET
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-item/:id
      method: PATCH
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-item
      method: DELETE
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-user
      method: GET
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-user
      method: POST
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-user/:id
      method: GET
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-user/:id
      method: PATCH
      relations:
        role:
          - where:
              slug: admin
    - url: /dashboard-user
      method: DELETE
      relations:
        role:
          - where:
              slug: admin
    - url: /setting/group/:slug
      method: GET
      relations:
        role:
          - where:
              slug: admin
    - url: /setting/user
      method: GET
      relations:
        role:
          - where:
              slug: admin
    - url: /setting
      method: GET
      relations:
        role:
          - where:
              slug: admin
    - url: /setting
      method: POST
      relations:
        role:
          - where:
              slug: admin
    - url: /setting/:settingId
      method: GET
      relations:
        role:
          - where:
              slug: admin
    - url: /setting/user/:slug
      method: PUT
      relations:
        role:
          - where:
              slug: admin
    - url: /setting/:slug
      method: PUT
      relations:
        role:
          - where:
              slug: admin
    - url: /setting
      method: PUT
      relations:
        role:
          - where:
              slug: admin
    - url: /setting
      method: DELETE
      relations:
        role:
          - where:
              slug: admin
    - url: /setting/:settingId
      method: PATCH
      relations:
        role:
          - where:
              slug: admin
  setting_group:
    - slug: general
      icon: settings
      name:
        en: General
        pt: Geral
      description:
        en: General settings and configurations.
        pt: Configurações e definições gerais.
      relations:
        setting:
          - slug: url
            type: string
            name:
              en: Base URL
              pt: URL Base
            description:
              en: The base URL of the system
              pt: A URL base do sistema
            value: http://localhost:3200
            user_override: false
    - slug: multifactor
      icon: lock-password
      name:
        en: Multifactor
        pt: Multifator
      description:
        en: Configure the multifactor authentication settings.
        pt: Configurar as definições de autenticação multifatorial.
      relations:
        setting:
          - slug: mfa-issuer
            type: string
            name:
              en: Issuer
              pt: Emissor
            description:
              en: The issuer of the multifactor authentication
              pt: O emissor da autenticação multifatorial
            value: Hedhog
            user_override: false
          - slug: mfa-window
            type: number
            name:
              en: Window
              pt: Janela
            description:
              en: The window value defines the tolerance margin for multifactor authentication, allowing to verify tokens that are within a specific range of counters (HOTP) or time periods (TOTP), both before and after the expected value.
              pt: O valor window define a margem de tolerância para autenticação multifatorial, permitindo verificar tokens que estão dentro de um intervalo específico de contadores (HOTP) ou períodos de tempo (TOTP), tanto antes quanto depois do valor esperado.
            value: 1
            user_override: false
          - slug: mfa-setp
            type: number
            name:
              en: Step
              pt: Passo
            description:
              en: The step in seconds that determines how long a code will be available in the user's app for multifactor authentication
              pt: O passo em segundos que determina por quanto tempo um código ficará disponível no aplicativo do usuário para autenticação multifatorial
            value: 30
            user_override: false
    - slug: localization
      icon: world
      name:
        en: Localization
        pt: Localização
      description:
        en: Configure the localization setting.
        pt: Configurar as definições de localização.
      relations:
        setting:
          - slug: language
            type: string
            name:
              en: Default Language
              pt: Idioma Padrão
            description:
              en: The system default language, each user can have their own preferred language
              pt:
                O idioma padrão do sistema, cada usuário pode ter o seu próprio idioma
                preferido
            value: en
            user_override: true
          - slug: timezone
            type: string
            name:
              en: Timezone
              pt: Fuso Horário
            description:
              en: The timezone to use
              pt: O fuso horário a utilizar
            value: UTC
            user_override: true
    - slug: oauth
      icon: brand-auth0
      name:
        en: OAuth
        pt: OAuth
      description:
        en: OAuth settings and configurations.
        pt: Configurações e definições do OAuth.
      relations:
        setting:
          - slug: google_client_id
            type: string
            name:
              en: Google Client ID
              pt: ID do Cliente Google
            description:
              en: The client ID for Google OAuth
              pt: O ID do cliente para o OAuth do Google
            value: ''
            user_override: false
          - slug: google_client_secret
            type: string
            name:
              en: Google Client Secret
              pt: Segredo do Cliente Google
            description:
              en: The client secret for Google OAuth
              pt: O segredo do cliente para o OAuth do Google
            value: ''
            user_override: false
          - slug: google_scopes
            type: array
            name:
              en: Google Scopes
              pt: Escopos do Google
            description:
              en: The scopes for Google OAuth
              pt: Os escopos para o OAuth do Google
            value: '["email","profile"]'
            user_override: false
          - slug: facebook_client_id
            type: string
            name:
              en: Facebook Client ID
              pt: ID do Cliente Facebook
            description:
              en: The client ID for Facebook OAuth
              pt: O ID do cliente para o OAuth do Facebook
            value: ''
            user_override: false
          - slug: facebook_client_secret
            type: string
            name:
              en: Facebook Client Secret
              pt: Segredo do Cliente Facebook
            description:
              en: The client secret for Facebook OAuth
              pt: O segredo do cliente para o OAuth do Facebook
            value: ''
            user_override: false
          - slug: facebook_scopes
            type: array
            name:
              en: Facebook Scopes
              pt: Escopos do Facebook
            description:
              en: The scopes for Facebook OAuth
              pt: Os escopos para o OAuth do Facebook
            value: '["id","emails","name","displayName","photos"]'
            user_override: false
  menu:
    - url: /management/setting
      icon: settings
      name:
        en: Setting
        pt: Configurações
      slug: /management/setting
    - menu_id:
        where:
          slug: /management
      slug: /settings
      icon: settings
      name:
        en: Settings
        pt: Configurações
    - menu_id:
        where:
          slug: /settings
      name:
        en: Setting Group
        pt: Grupo de Configuração
      icon: settings
      url: /settings/setting-group
      slug: /settings/setting-group
    - menu_id:
        where:
          slug: /settings
      name:
        en: Setting User
        pt: Configuração de Usuário
      icon: user-cog
      url: /settings/setting-user
      slug: /settings/setting-user
    - menu_id:
        where:
          slug: /settings
      name:
        en: Locale
        pt: Locale
      icon: world
      url: /settings/locale
      slug: /settings/locale
    - url: /
      icon: dashboard
      name:
        en: Dashboard
        pt: Dashboard
      slug: /
    - url: /management
      icon: settings-2
      name:
        en: Management
        pt: Gerenciamento
      slug: /management
    - menu_id:
        where:
          slug: /management
      url: /management/user
      icon: user
      name:
        en: User
        pt: Usuários
      slug: /management/user
    - menu_id:
        where:
          slug: /management
      url: /management/role
      icon: circles
      name:
        en: Role
        pt: Cargos
      slug: /management/role
    - menu_id:
        where:
          slug: /management
      url: /management/screen
      icon: device-tv
      name:
        en: Screen
        pt: Telas
      slug: /management/screen
    - menu_id:
        where:
          slug: /management
      url: /management/menu
      icon: menu
      name:
        en: Menu
        pt: Menu
      slug: /management/menu
    - menu_id:
        where:
          slug: /management
      url: /management/route
      icon: route
      name:
        en: Route
        pt: Rotas
      slug: /management/route
    - name:
        en: Dashboard
        pt: Dashboard
      icon: dashboard
      url: /management/dashboard
      slug: /management/dashboard
      menu_id:
        where:
          slug: /management
      relations:
        role:
          - where:
              slug: admin
    - name:
        en: Dashboard Component
        pt: Componente do Dashboard
      icon: dashboard
      url: /management/dashboard-component
      slug: /management/dashboard-component
      menu_id:
        where:
          slug: /management
      relations:
        role:
          - where:
              slug: admin
    - name:
        en: Dashboard Item
        pt: Item do Dashboard
      icon: dashboard
      url: /management/dashboard-item
      slug: /management/dashboard-item
      menu_id:
        where:
          slug: /management
      relations:
        role:
          - where:
              slug: admin
    - name:
        en: Dashboard User
        pt: Usuário do Dashboard
      icon: dashboard
      url: /management/dashboard-user
      slug: /management/dashboard-user
      menu_id:
        where:
          slug: /management
      relations:
        role:
          - where:
              slug: admin
  screen:
    - slug: /management/setting
      icon: settings
      name:
        en: Setting
        pt: Configurações
      description:
        en: Manage system setting and configurations.
        pt: Gerenciar configurações e definições do sistema.
      relations:
        route:
          - where:
              url:
                like: /setting%
    - name:
        en: Setting Group
        pt: Grupo de Configuração
      slug: /settings/setting-group
      description:
        en: Screen to manage a group of settings
        pt: Tela para gerenciar grupo de configurações
      icon: settings
    - name:
        en: Setting User
        pt: Configuração de Usuário
      slug: /settings/setting-user
      description:
        en: Screen to manage user settings
        pt: Tela para gerenciar configurações de usuário
      icon: user-cog
    - name:
        en: Locale
        pt: Locale
      slug: /settings/locale
      description:
        en: Screen to manage locale
        pt: Tela para gerenciar localização/tradução
      icon: world
      relations:
        route:
          - where:
              url:
                like: /locale%
    - slug: /management/user
      icon: user
      name:
        en: User
        pt: Usuários
      description:
        en: Manage user in the system.
        pt: Gerenciar usuários no sistema.
      relations:
        route:
          - where:
              url:
                like: /user%
    - slug: /management/role
      icon: circles
      name:
        en: Role
        pt: Funções
      description:
        en: Manage role assigned to user.
        pt: Gerenciar funções atribuídas a usuários.
      relations:
        route:
          - where:
              url:
                like: /role%
    - slug: /management/screen
      icon: device-tv
      name:
        en: Screen
        pt: Telas
      description:
        en: Manage the screen available in the system.
        pt: Gerenciar as telas disponíveis no sistema.
      relations:
        route:
          - where:
              url:
                like: /screen%
    - slug: /management/menu
      icon: menu
      name:
        en: Menu
        pt: Menu
      description:
        en: Manage the menu in the system.
        pt: Gerenciar os menu no sistema.
      relations:
        route:
          - where:
              url:
                like: /menu%
    - slug: /management/route
      icon: route
      name:
        en: Route
        pt: Rotas
      description:
        en: Manage route for navigation within the system.
        pt: Gerenciar rotas para navegação dentro do sistema.
      relations:
        route:
          - where:
              url:
                like: /route%
    - name:
        en: Dashboard
        pt: Dashboard
      slug: dashboard
      description:
        en: Screen to manage dashboard
        pt: Tela para gerenciar dashboard
      icon: dashboard
    - name:
        en: Dashboard Component
        pt: Componente de Dashboard
      slug: dashboard-component
      description:
        en: Screen to manage dashboard component
        pt: Tela para gerenciar componentes de dashboard
      icon: dashboard
    - name:
        en: Dashboard User
        pt: Componente de Dashboard
      slug: dashboard-user
      description:
        en: Screen to manage dashboard user
        pt: Tela para gerenciar usuários de dashboard
      icon: dashboard
    - name:
        en: Dashboard Item
        pt: Item de Dashboard
      slug: dashboard-item
      description:
        en: Screen to manage dashboard item
        pt: Tela para gerenciar itens de dashboard
      icon: dashboard
  multifactor:
    - name:
        en: Email
        pt: E-mail
      slug: email
    - name:
        en: Authenticator
        pt: Autenticador
      slug: authenticator
  user:
    - name: Administrator
      email: root@hedhog.com
      password:
        hash: changeme
    - name: User
      email: user@hedhog.com
      password:
        hash: changeme
  role:
    - slug: admin
      name:
        en: Administrator
        pt: Administrador
      description:
        en: System administrator with full access.
        pt: Administrador do sistema com acesso total.
      relations:
        user:
          - where:
              email: root@hedhog.com
        menu:
          - where:
              id:
                gte: 0
        route:
          - where:
              id:
                gte: 0
        screen:
          - where:
              id:
                gte: 0
    - slug: screen-manager
      name:
        en: Screen Manager
        pt: Gerente de Telas
      description:
        en: Manage screen in the system.
        pt: Gerenciar telas no sistema.
      relations:
        user:
          - where:
              email: user@hedhog.com
        route:
          - where:
              url:
                like: /screen%
        menu:
          - where:
              slug: /
    - slug: admin-access
      name:
        en: Admin Access
        pt: Acesso de Administrador
      description:
        en: Access to administrative features.
        pt: Acesso a funcionalidades administrativas.
      relations:
        user:
          - where:
              email: root@hedhog.com
          - where:
              email: user@hedhog.com
        route:
          - where:
              method: GET
              url:
                in:
                  - /menu/system
                  - /auth/verify
                  - /setting/group/:slug
                  - /setting/group
          - where:
              method: PUT
              url:
                in:
                  - /setting/:slug
    - slug: user
      name:
        en: User
        pt: Usuário
      description:
        en: Normal user of the system.
        pt: Usuário comum do sistema.
  translation_namespace:
    - name: translation
      relations:
        translation:
          - locale_id:
              where:
                code: en
            name: slogan
            value: Administration Panel
          - locale_id:
              where:
                code: pt
            name: slogan
            value: Painel de Administração
          - locale_id:
              where:
                code: en
            name: en
            value: English
          - locale_id:
              where:
                code: en
            name: pt
            value: Portuguese
          - locale_id:
              where:
                code: pt
            name: en
            value: Inglês
          - locale_id:
              where:
                code: pt
            name: pt
            value: Português
  dashboard:
    - slug: default
  dashboard_component:
    - slug: system-info
      path: system-info
      width: 4
      height: 14
      name:
        en: System Info
        pt: Informações do Sistema
    - slug: module-installed
      path: module-installed
      width: 4
      height: 14
      name:
        en: Modules Installed
        pt: Módulos Instalados
    - slug: user-summary
      path: user-summary
      width: 4
      height: 14
      name:
        en: Users Summary
        pt: Resumo de Usuários
    - slug: database-stats
      path: database-stats
      width: 12
      height: 4
      name:
        en: Database Stats
        pt: Estatísticas do Banco de Dados
  dashboard_item:
    - component_id:
        where:
          slug: system-info
      dashboard_id:
        where:
          slug: default
      width: 4
      height: 14
      x_axis: 0
      y_axis: 0
    - component_id:
        where:
          slug: module-installed
      dashboard_id:
        where:
          slug: default
      width: 4
      height: 14
      x_axis: 4
      y_axis: 0
    - component_id:
        where:
          slug: user-summary
      dashboard_id:
        where:
          slug: default
      width: 4
      height: 14
      x_axis: 8
      y_axis: 0
    - component_id:
        where:
          slug: database-stats
      dashboard_id:
        where:
          slug: default
      width: 12
      height: 4
      x_axis: 0
      y_axis: 14
screens:
  dashboard:
    title:
      en: Dashboard
      pt: Dashboard
    menu:
      menu_id:
        where:
          slug: /management
      url: /management/dashboard
      icon: adjustments
      name:
        en: Dashboard
        pt: Dashboard
      slug: /management/dashboard
      relations:
        role:
          - where:
              slug: admin
  dashboard_component:
    title:
      en: Dashboard Component
      pt: Componente do Dashboard
    menu:
      menu_id:
        where:
          slug: /management
      url: /management/dashboard-component
      icon: adjustments
      name:
        en: Dashboard Component
        pt: Componente do Dashboard
      slug: /management/dashboard-component
      relations:
        role:
          - where:
              slug: admin
  dashboard_user:
    title:
      en: Dashboard User
      pt: Usuário de Dashboard
    menu:
      menu_id:
        where:
          slug: /management
      url: /management/dashboard-user
      icon: adjustments
      name:
        en: Dashboard User
        pt: Usuário de Dashboard
      slug: /management/dashboard-user
      relations:
        role:
          - where:
              slug: admin
  dashboard_item:
    title:
      en: Dashboard Item
      pt: Item de Dashboard
    menu:
      menu_id:
        where:
          slug: /management
      url: /management/dashboard-item
      icon: adjustments
      name:
        en: Dashboard Item
        pt: Item de Dashboard
      slug: /management/dashboard-item
      relations:
        role:
          - where:
              slug: admin
routes:
  - path: management
    children:
      - path: dashboard
        lazy:
          component: ./pages/management/dashboard/dashboard/index.tsx
      - path: dashboard-component
        lazy:
          component: ./pages/management/dashboard/dashboard-component/index.tsx
      - path: dashboard-item
        lazy:
          component: ./pages/management/dashboard/dashboard-item/index.tsx
      - path: dashboard-user
        lazy:
          component: ./pages/management/dashboard/dashboard-user/index.tsx
