<?php
/*
 * @copyright Copyright (c) 2022 AltumCode (https://altumcode.com/)
 *
 * This software is exclusively sold through https://altumcode.com/ by the AltumCode author.
 * Downloading this product from any other sources and running it without a proper license is illegal,
 *  except the official ones linked from https://altumcode.com/.
 */

$access = [
    'read' => [
        'read.all' => l('team_members.input.access.all')
    ],

    'create' => [
        'create.links' => l('links.title'),
        'create.pixels' => l('pixels.title'),
        'create.projects' => l('projects.title'),
    ],

    'update' => [
        'update.links' => l('links.title'),
        'update.pixels' => l('pixels.title'),
        'update.projects' => l('projects.title'),
    ],

    'delete' => [
        'delete.links' => l('links.title'),
        'delete.pixels' => l('pixels.title'),
        'delete.projects' => l('projects.title'),
        'delete.data' => l('data.title'),
    ],
];

if(settings()->links->biolinks_is_enabled) {
    $access['create']['create.biolinks_blocks'] = l('biolinks_blocks.title');
    $access['update']['update.biolinks_blocks'] = l('biolinks_blocks.title');
    $access['delete']['delete.biolinks_blocks'] = l('biolinks_blocks.title');
}

if(settings()->links->qr_codes_is_enabled) {
    $access['create']['create.qr_codes'] = l('qr_codes.title');
    $access['update']['update.qr_codes'] = l('qr_codes.title');
    $access['delete']['delete.qr_codes'] = l('qr_codes.title');
}

if(settings()->links->domains_is_enabled) {
    $access['create']['create.domains'] = l('domains.title');
    $access['update']['update.domains'] = l('domains.title');
    $access['delete']['delete.domains'] = l('domains.title');
}

if(\Altum\Plugin::is_active('payment-blocks')) {
    $access['delete']['delete.guests_payments'] = l('guests_payments.title');
    $access['create']['create.payment_processors'] = l('payment_processors.title');
    $access['update']['update.payment_processors'] = l('payment_processors.title');
    $access['delete']['delete.payment_processors'] = l('payment_processors.title');
}

return $access;
