import * as permissions from '@/modules/@common/acl/constants';

export const ROOT_PAGE = {
  path: '/',
  permissions: null,
};

export const USERS_PAGE = {
  path: '/users',
  permissions: [permissions.PCN_GET_USERS],
};

export const ONLINE_HELP_CONFIG_PAGE = {
  path: '/online-help',
  permissions: [permissions.PCN_GET_ONLINE_HELP],
};

export const PARTNERS_ACCOUNTS_PAGE = {
  path: '/accounts',
  permissions: [permissions.PCN_GET_PARTNERS_ACCOUNTS],
};

export const CONFIG_PAGE = {
  path: '/config',
  permissions: [permissions.PCN_GET_LUMINOUS_CONFIG],
};

export const CUSTOM_REPORTS_PAGE = {
  path: '/custom-reports',
  permissions: [permissions.PCN_GET_CUSTOM_REPORTS],
};

export const NOTIFICATIONS_PAGE = {
  path: '/notifications',
  permissions: [permissions.PCN_POST_NOTIFICATIONS],
};

export const PERMISSIONS_PAGE = {
  path: '/permissions',
  permissions: [permissions.PCN_GET_ADMIN],
};

export const ROLES_PERMISSIONS_PAGE = {
  path: '/roles-permissions',
  permissions: [permissions.WEAVO_VIEW_ROLES_PERMISSIONS],
};

export const CONTENT_OWNERS_PAGE = {
  path: '/content-owners',
  permissions: [permissions.MANAGE_CONTENT_OWNERS],
};

export const FEEDS_PAGE = {
  path: '/feeds',
  permissions: [permissions.PCN_GET_FEEDS, permissions.PCN_GET_SELF_SERVE_SOURCES],
};

export const PUBLISHER_PAGE = {
  path: '/publisher',
  permissions: [permissions.PCN_GET_PUBLISHER],
};

export const ADVERTISERS_PAGE = {
  path: '/advertisers',
  permissions: [permissions.PCN_GET_ADVERTISERS],
};

export const INVENTORY_PAGE = {
  path: '/inventory',
  permissions: [permissions.PCN_GET_INVENTORY],
};

export const AD_SERVERS_PAGE = {
  path: '/ad-servers',
  permissions: [permissions.PCN_GET_INVENTORY],
};

export const PLAYER_PCN_PAGE = {
  path: '/player-old',
  permissions: [permissions.PCN_GET_PLAYER],
};

export const LIVE_PAGE = {
  path: '/live',
  permissions: [permissions.PCN_GET_LIVE_EVENTS],
};

export const LIVE_NEW_PAGE = {
  path: '/live/new',
  permissions: [permissions.PCN_GET_LIVE_EVENTS],
};

export const LIVE_EDIT_PAGE = {
  path: '/live/:id',
  permissions: [permissions.PCN_GET_LIVE_EVENTS],
};

export const EDITORIAL_PAGE = {
  path: '/studio',
  permissions: [permissions.PCN_GET_VIDEO],
};

export const HOSTED_WATCH = {
  path: '/watch/:watchId?',
  permissions: [permissions.PCN_GET_HOSTED_WATCH],
};

export const HOSTED_WATCH_PAGE = {
  path: '/watch',
  permissions: HOSTED_WATCH.permissions.slice(),
};

export const ENTITIES_PAGE = {
  path: '/entities',
  permissions: [permissions.PCN_GET_ENTITIES],
};

export const INVITATIONS_PAGE = {
  path: '/invitations',
  permissions: [permissions.PCN_INVITATIONS_SHOW_TABLE, permissions.PCN_GET_INVITATIONS],
};

export const PUBLISHING_PAGE = {
  path: '/publishing',
  permissions: [permissions.PCN_GET_DESTINATIONS],
};

export const PUBLISHING_NEW_PAGE = {
  path: '/publishing/new/:platform',
  permissions: [permissions.PCN_GET_DESTINATIONS],
};

export const PUBLISHING_EDIT_PAGE = {
  path: '/publishing/:id',
  permissions: [permissions.PCN_GET_DESTINATIONS],
};

export const X_RAY_CAMPAIGNS_PAGE = {
  path: '/x-ray/campaigns',
  permissions: [permissions.PCN_GET_X_RAY_CAMPAIGNS],
};

export const X_RAY_CREATIVES_PAGE = {
  path: '/x-ray/creatives',
  permissions: [permissions.PCN_GET_X_RAY_CREATIVES],
};

export const X_RAY_LINE_ITEMS_PAGE = {
  path: '/x-ray/line-items',
  permissions: [permissions.PCN_GET_X_RAY_LINE_ITEMS],
};

export const LOGOUT_PAGE = {
  path: '/logout',
  permissions: null,
};

export const LOGIN_PAGE = {
  path: '/login',
  permissions: null,
};

export const PASSWORD_LESS_LOGIN_PAGE = {
  path: '/passwordless-login',
  permissions: null,
};

export const PASSWORD_LESS_LOGIN_CODE_PAGE = {
  path: '/passwordless-login-code',
  permissions: null,
};

export const USER_AUTH_ERROR_PAGE = {
  path: '/user-auth-error',
  permissions: null,
};

export const ACTIVATION_GUEST_PAGE = {
  path: '/activation-guest',
  permissions: null,
};

export const FORGOT_PASSWORD_PAGE = {
  path: '/forgot-password',
  permissions: null,
};

export const RESET_PASSWORD_PAGE = {
  path: '/reset-password',
  permissions: null,
};

export const CREATE_PASSWORD_PAGE = {
  path: '/create-password',
  permissions: null,
};

export const SIGN_IN_PAGE = {
  path: '/signin',
  permissions: null,
};

export const NOT_FOUND_PAGE = {
  path: '/404',
  permissions: null,
};

export const NOT_PERMITTED_PAGE = {
  path: '/403',
  permissions: null,
};

export const SUPPLY_LIST_PAGE = {
  path: '/supply',
  permissions: [
    permissions.PCN_GET_SUPPLY,
    permissions.PCN_GET_MARKETPLACE_DASHBOARD,
    permissions.PCN_GET_MARKETPLACE_SELF_SERVE,
  ],
};

export const SUPPLY_PAGE = {
  path: '/supply/:accountId?/(sites)?/:siteId?/(tags)?/:tagId?',
  permissions: [
    permissions.PCN_GET_SUPPLY,
    permissions.PCN_GET_MARKETPLACE_DASHBOARD,
    permissions.PCN_GET_MARKETPLACE_SELF_SERVE,
  ],
};

export const DEMAND_LIST_PAGE = {
  path: '/demand',
  permissions: [
    permissions.PCN_GET_DEMAND,
    permissions.PCN_GET_MARKETPLACE_DASHBOARD,
    permissions.PCN_GET_MARKETPLACE_SELF_SERVE,
  ],
};

export const DEMAND_PAGE = {
  path: '/demand/:accountId?/(advertisers)?/:advertiserId?/(tags)?/:tagId?',
  permissions: [
    permissions.PCN_GET_DEMAND,
    permissions.PCN_GET_MARKETPLACE_DASHBOARD,
    permissions.PCN_GET_MARKETPLACE_SELF_SERVE,
  ],
};

export const KEY_LIST_PAGE = {
  path: '/key-lists',
  permissions: [permissions.PCN_GET_MARKETPLACE_DASHBOARD, permissions.PCN_GET_MARKETPLACE_SELF_SERVE],
};

export const KEY_LIST_FORM_PAGE = {
  path: '/key-lists/:id',
  permissions: [permissions.PCN_GET_MARKETPLACE_DASHBOARD, permissions.PCN_GET_MARKETPLACE_SELF_SERVE],
};

export const MARKETPLACE_HB_CONNECTORS_PAGE = {
  path: '/hb-connectors',
  permissions: [permissions.PCN_GET_INVENTORY],
};

export const MARKETPLACE_HB_CONNECTOR_FORM_PAGE = {
  path: '/hb-connectors/:id',
  permissions: [permissions.PCN_GET_INVENTORY],
};

export const MARKETPLACE_DASHBOARD_PAGE = {
  path: '/marketplace-dashboard',
  permissions: [permissions.PCN_GET_MARKETPLACE_DASHBOARD],
};

export const MARKETPLACE_SELF_SERVE = {
  path: '/demand',
  permissions: [permissions.PCN_GET_MARKETPLACE_SELF_SERVE],
};

export const FORMS_NEW_PAGE = {
  path: '/forms/new',
  permissions: [permissions.PCN_POST_FORMS_EDITOR],
};

export const FORMS_EDIT_PAGE = {
  path: '/forms/:id/(duplicate)?',
  permissions: [permissions.PCN_GET_FORMS_EDITOR],
};

export const FORMS = {
  path: '/forms',
  permissions: [permissions.PCN_GET_FORMS_EDITOR],
};

export const FORM_TEMPLATES = {
  path: '/form-templates',
  permissions: [permissions.GET_FORM_TEMPLATES],
};

export const FORM_TEMPLATE_NEW_PAGE = {
  path: '/form-templates/new',
  permissions: [permissions.POST_FORM_TEMPLATES],
};

export const FORM_TEMPLATE_EDIT_PAGE = {
  path: '/form-templates/:id/(duplicate)?',
  permissions: [permissions.GET_FORM_TEMPLATES],
};

export const ANALYTICS_PAGE = {
  path: '/analytics',
  permissions: [permissions.PCN_GET_ANALYTICS],
};

export const ANALYTICS_VIDEO_CONTENT_PERFORMANCE = {
  path: '/analytics-new/video-content-performance',
  permissions: [permissions.ANALYTICS_VIDEO_CONTENT_PERFORMANCE],
};

export const ANALYTICS_LIVE_DASHBOARD = {
  path: '/analytics-new/live-events-past',
  permissions: [permissions.ANALYTICS_LIVE_EVENTS_DASHBOARD],
};

export const ANALYTICS_MONETIZATION_DASHBOARD = {
  path: '/analytics-new/monetization',
  permissions: [permissions.ANALYTICS_MONETIZATION_DASHBOARD],
};

export const ANALYTICS_REVENUE_OVERVIEW = {
  path: '/analytics-new/revenue-overview',
  permissions: [permissions.ANALYTICS_MONETIZATION_DASHBOARD],
};

export const ANALYTICS_CUSTOM_REPORTS = {
  path: '/custom-reports-new',
  permissions: [permissions.ANALYTICS_CUSTOM_REPORTS],
};

export const USER_RULES_SETTINGS = {
  path: '/personal-settings',
  permissions: [permissions.GET_PERSONAL_SETTING],
};

export const SSO_PAGE = {
  path: '/sso',
  permissions: [permissions.SSO_PAGE],
};

export const SSO_LOGIN_PAGE = {
  path: '/sso-login',
  permissions: null,
};

export const PLAYER_PAGE = {
  path: '/player',
  permissions: [permissions.PCN_GET_PLAYER_NEW],
};

export const PLAYER_EDITOR = {
  path: '/player/:playerTypeId/(id)?',
  permissions: [permissions.PCN_POST_PLAYER_NEW],
};

export const PLAYER_EDITOR_COPY = {
  path: '/player/:playerTypeId/new?copy=(id)?',
  permissions: [permissions.PCN_POST_PLAYER_NEW],
};

export const HUBS_PAGE = {
  path: '/hubs',
  permissions: [permissions.PCN_GET_PUBLISHER],
};

export const HUB_EDITOR = {
  path: '/hubs/(id)?',
  permissions: [permissions.PCN_GET_PUBLISHER],
};
