<?php

/*
<COPYRIGHT>

    Copyright © 2016-2025, Canyon GBS LLC. All rights reserved.

    Aiding App™ is licensed under the Elastic License 2.0. For more details,
    see <https://github.com/canyongbs/aidingapp/blob/main/LICENSE.>

    Notice:

    - You may not provide the software to third parties as a hosted or managed
      service, where the service provides users with access to any substantial set of
      the features or functionality of the software.
    - You may not move, change, disable, or circumvent the license key functionality
      in the software, and you may not remove or obscure any functionality in the
      software that is protected by the license key.
    - You may not alter, remove, or obscure any licensing, copyright, or other notices
      of the licensor in the software. Any use of the licensor’s trademarks is subject
      to applicable law.
    - Canyon GBS LLC respects the intellectual property rights of others and expects the
      same in return. Canyon GBS™ and Aiding App™ are registered trademarks of
      Canyon GBS LLC, and we are committed to enforcing and protecting our trademarks
      vigorously.
    - The software solution, including services, infrastructure, and code, is offered as a
      Software as a Service (SaaS) by Canyon GBS LLC.
    - Use of this software implies agreement to the license terms and conditions as stated
      in the Elastic License 2.0.

    For more information or inquiries please visit our website at
    <https://www.canyongbs.com> or contact us via email at legal@canyongbs.com.

</COPYRIGHT>
*/

use Database\Migrations\Concerns\CanModifyPermissions;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\DB;

return new class () extends Migration {
    use CanModifyPermissions;

    public function up(): void
    {
        $this->createPermissions(
            Arr::except(
                [
                    'notification_setting.view-any' => 'Notification Setting',
                    'notification_setting.create' => 'Notification Setting',
                    'notification_setting.*.view' => 'Notification Setting',
                    'notification_setting.*.update' => 'Notification Setting',
                    'notification_setting.*.delete' => 'Notification Setting',
                    'notification_setting.*.restore' => 'Notification Setting',
                    'notification_setting.*.force-delete' => 'Notification Setting',
                    'pronouns.view-any' => 'Pronouns',
                    'pronouns.create' => 'Pronouns',
                    'pronouns.*.view' => 'Pronouns',
                    'pronouns.*.update' => 'Pronouns',
                    'pronouns.*.delete' => 'Pronouns',
                    'pronouns.*.restore' => 'Pronouns',
                    'pronouns.*.force-delete' => 'Pronouns',
                    'system_user.view-any' => 'System User',
                    'system_user.create' => 'System User',
                    'system_user.*.view' => 'System User',
                    'system_user.*.update' => 'System User',
                    'system_user.*.delete' => 'System User',
                    'system_user.*.restore' => 'System User',
                    'system_user.*.force-delete' => 'System User',
                    'user.view-any' => 'User',
                    'user.create' => 'User',
                    'user.*.view' => 'User',
                    'user.*.update' => 'User',
                    'user.*.delete' => 'User',
                    'user.*.restore' => 'User',
                    'user.*.force-delete' => 'User',
                    'inbound_webhook.view-any' => 'Inbound Webhook',
                    'inbound_webhook.*.view' => 'Inbound Webhook',
                    'timeline.view-any' => 'Timeline',
                    'timeline.create' => 'Timeline',
                    'timeline.*.view' => 'Timeline',
                    'timeline.*.update' => 'Timeline',
                    'timeline.*.delete' => 'Timeline',
                    'timeline.*.restore' => 'Timeline',
                    'timeline.*.force-delete' => 'Timeline',
                    'team.view-any' => 'Team',
                    'team.create' => 'Team',
                    'team.*.view' => 'Team',
                    'team.*.update' => 'Team',
                    'team.*.delete' => 'Team',
                    'team.*.restore' => 'Team',
                    'team.*.force-delete' => 'Team',
                    'task.import' => 'Task',
                    'task.view-any' => 'Task',
                    'task.create' => 'Task',
                    'task.*.view' => 'Task',
                    'task.*.update' => 'Task',
                    'task.*.delete' => 'Task',
                    'task.*.restore' => 'Task',
                    'task.*.force-delete' => 'Task',
                    'survey.view-any' => 'Survey',
                    'survey.create' => 'Survey',
                    'survey.*.view' => 'Survey',
                    'survey.*.update' => 'Survey',
                    'survey.*.delete' => 'Survey',
                    'survey.*.restore' => 'Survey',
                    'survey.*.force-delete' => 'Survey',
                    'change_request_response.view-any' => 'Change Request Response',
                    'change_request_response.create' => 'Change Request Response',
                    'change_request_response.*.view' => 'Change Request Response',
                    'change_request_response.*.update' => 'Change Request Response',
                    'change_request_response.*.delete' => 'Change Request Response',
                    'change_request_response.*.restore' => 'Change Request Response',
                    'change_request_response.*.force-delete' => 'Change Request Response',
                    'change_request_status.view-any' => 'Change Request Status',
                    'change_request_status.create' => 'Change Request Status',
                    'change_request_status.*.view' => 'Change Request Status',
                    'change_request_status.*.update' => 'Change Request Status',
                    'change_request_status.*.delete' => 'Change Request Status',
                    'change_request_status.*.restore' => 'Change Request Status',
                    'change_request_status.*.force-delete' => 'Change Request Status',
                    'change_request_type.view-any' => 'Change Request Type',
                    'change_request_type.create' => 'Change Request Type',
                    'change_request_type.*.view' => 'Change Request Type',
                    'change_request_type.*.update' => 'Change Request Type',
                    'change_request_type.*.delete' => 'Change Request Type',
                    'change_request_type.*.restore' => 'Change Request Type',
                    'change_request_type.*.force-delete' => 'Change Request Type',
                    'change_request.view-any' => 'Change Request',
                    'change_request.create' => 'Change Request',
                    'change_request.*.view' => 'Change Request',
                    'change_request.*.update' => 'Change Request',
                    'change_request.*.delete' => 'Change Request',
                    'change_request.*.restore' => 'Change Request',
                    'change_request.*.force-delete' => 'Change Request',
                    'service_request_assignment.view-any' => 'Service Request Assignment',
                    'service_request_assignment.create' => 'Service Request Assignment',
                    'service_request_assignment.*.view' => 'Service Request Assignment',
                    'service_request_assignment.*.update' => 'Service Request Assignment',
                    'service_request_assignment.*.delete' => 'Service Request Assignment',
                    'service_request_assignment.*.restore' => 'Service Request Assignment',
                    'service_request_assignment.*.force-delete' => 'Service Request Assignment',
                    'service_request_form.view-any' => 'Service Request Form',
                    'service_request_form.create' => 'Service Request Form',
                    'service_request_form.*.view' => 'Service Request Form',
                    'service_request_form.*.update' => 'Service Request Form',
                    'service_request_form.*.delete' => 'Service Request Form',
                    'service_request_form.*.restore' => 'Service Request Form',
                    'service_request_form.*.force-delete' => 'Service Request Form',
                    'service_request_history.view-any' => 'Service Request History',
                    'service_request_history.create' => 'Service Request History',
                    'service_request_history.*.view' => 'Service Request History',
                    'service_request_history.*.update' => 'Service Request History',
                    'service_request_history.*.delete' => 'Service Request History',
                    'service_request_history.*.restore' => 'Service Request History',
                    'service_request_history.*.force-delete' => 'Service Request History',
                    'service_request_priority.view-any' => 'Service Request Priority',
                    'service_request_priority.create' => 'Service Request Priority',
                    'service_request_priority.*.view' => 'Service Request Priority',
                    'service_request_priority.*.update' => 'Service Request Priority',
                    'service_request_priority.*.delete' => 'Service Request Priority',
                    'service_request_priority.*.restore' => 'Service Request Priority',
                    'service_request_priority.*.force-delete' => 'Service Request Priority',
                    'service_request_status.view-any' => 'Service Request Status',
                    'service_request_status.create' => 'Service Request Status',
                    'service_request_status.*.view' => 'Service Request Status',
                    'service_request_status.*.update' => 'Service Request Status',
                    'service_request_status.*.delete' => 'Service Request Status',
                    'service_request_status.*.restore' => 'Service Request Status',
                    'service_request_status.*.force-delete' => 'Service Request Status',
                    'service_request_type.view-any' => 'Service Request Type',
                    'service_request_type.create' => 'Service Request Type',
                    'service_request_type.*.view' => 'Service Request Type',
                    'service_request_type.*.update' => 'Service Request Type',
                    'service_request_type.*.delete' => 'Service Request Type',
                    'service_request_type.*.restore' => 'Service Request Type',
                    'service_request_type.*.force-delete' => 'Service Request Type',
                    'service_request_update.view-any' => 'Service Request Update',
                    'service_request_update.create' => 'Service Request Update',
                    'service_request_update.*.view' => 'Service Request Update',
                    'service_request_update.*.update' => 'Service Request Update',
                    'service_request_update.*.delete' => 'Service Request Update',
                    'service_request_update.*.restore' => 'Service Request Update',
                    'service_request_update.*.force-delete' => 'Service Request Update',
                    'service_request.view-any' => 'Service Request',
                    'service_request.create' => 'Service Request',
                    'service_request.*.view' => 'Service Request',
                    'service_request.*.update' => 'Service Request',
                    'service_request.*.delete' => 'Service Request',
                    'service_request.*.restore' => 'Service Request',
                    'service_request.*.force-delete' => 'Service Request',
                    'sla.view-any' => 'SLA',
                    'sla.create' => 'SLA',
                    'sla.*.view' => 'SLA',
                    'sla.*.update' => 'SLA',
                    'sla.*.delete' => 'SLA',
                    'sla.*.restore' => 'SLA',
                    'sla.*.force-delete' => 'SLA',
                    'report.view-any' => 'Report',
                    'report.create' => 'Report',
                    'report.*.view' => 'Report',
                    'report.*.update' => 'Report',
                    'report.*.delete' => 'Report',
                    'report.*.restore' => 'Report',
                    'report.*.force-delete' => 'Report',
                    'subscription.view-any' => 'Subscription',
                    'subscription.create' => 'Subscription',
                    'subscription.*.view' => 'Subscription',
                    'subscription.*.update' => 'Subscription',
                    'subscription.*.delete' => 'Subscription',
                    'subscription.*.restore' => 'Subscription',
                    'subscription.*.force-delete' => 'Subscription',
                    'outbound_deliverable.view-any' => 'Outbound Deliverable',
                    'outbound_deliverable.create' => 'Outbound Deliverable',
                    'outbound_deliverable.*.view' => 'Outbound Deliverable',
                    'outbound_deliverable.*.update' => 'Outbound Deliverable',
                    'outbound_deliverable.*.delete' => 'Outbound Deliverable',
                    'outbound_deliverable.*.restore' => 'Outbound Deliverable',
                    'outbound_deliverable.*.force-delete' => 'Outbound Deliverable',
                    'knowledge_base_item.view-any' => 'Knowledge Base Item',
                    'knowledge_base_item.create' => 'Knowledge Base Item',
                    'knowledge_base_item.*.view' => 'Knowledge Base Item',
                    'knowledge_base_item.*.update' => 'Knowledge Base Item',
                    'knowledge_base_item.*.delete' => 'Knowledge Base Item',
                    'knowledge_base_item.*.restore' => 'Knowledge Base Item',
                    'knowledge_base_item.*.force-delete' => 'Knowledge Base Item',
                    'knowledge_base_category.view-any' => 'Knowledge Base Category',
                    'knowledge_base_category.create' => 'Knowledge Base Category',
                    'knowledge_base_category.*.view' => 'Knowledge Base Category',
                    'knowledge_base_category.*.update' => 'Knowledge Base Category',
                    'knowledge_base_category.*.delete' => 'Knowledge Base Category',
                    'knowledge_base_category.*.restore' => 'Knowledge Base Category',
                    'knowledge_base_category.*.force-delete' => 'Knowledge Base Category',
                    'knowledge_base_quality.view-any' => 'Knowledge Base Quality',
                    'knowledge_base_quality.create' => 'Knowledge Base Quality',
                    'knowledge_base_quality.*.view' => 'Knowledge Base Quality',
                    'knowledge_base_quality.*.update' => 'Knowledge Base Quality',
                    'knowledge_base_quality.*.delete' => 'Knowledge Base Quality',
                    'knowledge_base_quality.*.restore' => 'Knowledge Base Quality',
                    'knowledge_base_quality.*.force-delete' => 'Knowledge Base Quality',
                    'knowledge_base_status.view-any' => 'Knowledge Base Status',
                    'knowledge_base_status.create' => 'Knowledge Base Status',
                    'knowledge_base_status.*.view' => 'Knowledge Base Status',
                    'knowledge_base_status.*.update' => 'Knowledge Base Status',
                    'knowledge_base_status.*.delete' => 'Knowledge Base Status',
                    'knowledge_base_status.*.restore' => 'Knowledge Base Status',
                    'knowledge_base_status.*.force-delete' => 'Knowledge Base Status',
                    'asset_check_in.view-any' => 'Asset Check In',
                    'asset_check_in.create' => 'Asset Check In',
                    'asset_check_in.*.view' => 'Asset Check In',
                    'asset_check_in.*.update' => 'Asset Check In',
                    'asset_check_in.*.delete' => 'Asset Check In',
                    'asset_check_in.*.restore' => 'Asset Check In',
                    'asset_check_in.*.force-delete' => 'Asset Check In',
                    'asset_check_out.view-any' => 'Asset Check Out',
                    'asset_check_out.create' => 'Asset Check Out',
                    'asset_check_out.*.view' => 'Asset Check Out',
                    'asset_check_out.*.update' => 'Asset Check Out',
                    'asset_check_out.*.delete' => 'Asset Check Out',
                    'asset_check_out.*.restore' => 'Asset Check Out',
                    'asset_check_out.*.force-delete' => 'Asset Check Out',
                    'asset_location.view-any' => 'Asset Location',
                    'asset_location.create' => 'Asset Location',
                    'asset_location.*.view' => 'Asset Location',
                    'asset_location.*.update' => 'Asset Location',
                    'asset_location.*.delete' => 'Asset Location',
                    'asset_location.*.restore' => 'Asset Location',
                    'asset_location.*.force-delete' => 'Asset Location',
                    'asset_status.view-any' => 'Asset Status',
                    'asset_status.create' => 'Asset Status',
                    'asset_status.*.view' => 'Asset Status',
                    'asset_status.*.update' => 'Asset Status',
                    'asset_status.*.delete' => 'Asset Status',
                    'asset_status.*.restore' => 'Asset Status',
                    'asset_status.*.force-delete' => 'Asset Status',
                    'asset_type.view-any' => 'Asset Type',
                    'asset_type.create' => 'Asset Type',
                    'asset_type.*.view' => 'Asset Type',
                    'asset_type.*.update' => 'Asset Type',
                    'asset_type.*.delete' => 'Asset Type',
                    'asset_type.*.restore' => 'Asset Type',
                    'asset_type.*.force-delete' => 'Asset Type',
                    'asset.view-any' => 'Asset',
                    'asset.create' => 'Asset',
                    'asset.*.view' => 'Asset',
                    'asset.*.update' => 'Asset',
                    'asset.*.delete' => 'Asset',
                    'asset.*.restore' => 'Asset',
                    'asset.*.force-delete' => 'Asset',
                    'maintenance_activity.view-any' => 'Maintenance Activity',
                    'maintenance_activity.create' => 'Maintenance Activity',
                    'maintenance_activity.*.view' => 'Maintenance Activity',
                    'maintenance_activity.*.update' => 'Maintenance Activity',
                    'maintenance_activity.*.delete' => 'Maintenance Activity',
                    'maintenance_activity.*.restore' => 'Maintenance Activity',
                    'maintenance_activity.*.force-delete' => 'Maintenance Activity',
                    'maintenance_provider.view-any' => 'Maintenance Provider',
                    'maintenance_provider.create' => 'Maintenance Provider',
                    'maintenance_provider.*.view' => 'Maintenance Provider',
                    'maintenance_provider.*.update' => 'Maintenance Provider',
                    'maintenance_provider.*.delete' => 'Maintenance Provider',
                    'maintenance_provider.*.restore' => 'Maintenance Provider',
                    'maintenance_provider.*.force-delete' => 'Maintenance Provider',
                    'email_template.view-any' => 'Email Template',
                    'email_template.create' => 'Email Template',
                    'email_template.*.view' => 'Email Template',
                    'email_template.*.update' => 'Email Template',
                    'email_template.*.delete' => 'Email Template',
                    'email_template.*.restore' => 'Email Template',
                    'email_template.*.force-delete' => 'Email Template',
                    'engagement_batch.view-any' => 'Engagement Batch',
                    'engagement_batch.create' => 'Engagement Batch',
                    'engagement_batch.*.view' => 'Engagement Batch',
                    'engagement_batch.*.update' => 'Engagement Batch',
                    'engagement_batch.*.delete' => 'Engagement Batch',
                    'engagement_batch.*.restore' => 'Engagement Batch',
                    'engagement_batch.*.force-delete' => 'Engagement Batch',
                    'engagement_deliverable.view-any' => 'Engagement Deliverable',
                    'engagement_deliverable.create' => 'Engagement Deliverable',
                    'engagement_deliverable.*.view' => 'Engagement Deliverable',
                    'engagement_deliverable.*.update' => 'Engagement Deliverable',
                    'engagement_deliverable.*.delete' => 'Engagement Deliverable',
                    'engagement_deliverable.*.restore' => 'Engagement Deliverable',
                    'engagement_deliverable.*.force-delete' => 'Engagement Deliverable',
                    'engagement_file.view-any' => 'Engagement File',
                    'engagement_file.create' => 'Engagement File',
                    'engagement_file.*.view' => 'Engagement File',
                    'engagement_file.*.update' => 'Engagement File',
                    'engagement_file.*.delete' => 'Engagement File',
                    'engagement_file.*.restore' => 'Engagement File',
                    'engagement_file.*.force-delete' => 'Engagement File',
                    'engagement_response.view-any' => 'Engagement Response',
                    'engagement_response.create' => 'Engagement Response',
                    'engagement_response.*.view' => 'Engagement Response',
                    'engagement_response.*.update' => 'Engagement Response',
                    'engagement_response.*.delete' => 'Engagement Response',
                    'engagement_response.*.restore' => 'Engagement Response',
                    'engagement_response.*.force-delete' => 'Engagement Response',
                    'engagement.view-any' => 'Engagement',
                    'engagement.create' => 'Engagement',
                    'engagement.*.view' => 'Engagement',
                    'engagement.*.update' => 'Engagement',
                    'engagement.*.delete' => 'Engagement',
                    'engagement.*.restore' => 'Engagement',
                    'engagement.*.force-delete' => 'Engagement',
                    'sms_template.view-any' => 'SMS Template',
                    'sms_template.create' => 'SMS Template',
                    'sms_template.*.view' => 'SMS Template',
                    'sms_template.*.update' => 'SMS Template',
                    'sms_template.*.delete' => 'SMS Template',
                    'sms_template.*.restore' => 'SMS Template',
                    'sms_template.*.force-delete' => 'SMS Template',
                    'division.view-any' => 'Division',
                    'division.create' => 'Division',
                    'division.*.view' => 'Division',
                    'division.*.update' => 'Division',
                    'division.*.delete' => 'Division',
                    'division.*.restore' => 'Division',
                    'division.*.force-delete' => 'Division',
                    'contact.import' => 'Contact',
                    'contact.view-any' => 'Contact',
                    'contact.create' => 'Contact',
                    'contact.*.view' => 'Contact',
                    'contact.*.update' => 'Contact',
                    'contact.*.delete' => 'Contact',
                    'contact.*.restore' => 'Contact',
                    'contact.*.force-delete' => 'Contact',
                    'contact_source.view-any' => 'Contact Source',
                    'contact_source.create' => 'Contact Source',
                    'contact_source.*.view' => 'Contact Source',
                    'contact_source.*.update' => 'Contact Source',
                    'contact_source.*.delete' => 'Contact Source',
                    'contact_source.*.restore' => 'Contact Source',
                    'contact_source.*.force-delete' => 'Contact Source',
                    'contact_status.view-any' => 'Contact Status',
                    'contact_status.create' => 'Contact Status',
                    'contact_status.*.view' => 'Contact Status',
                    'contact_status.*.update' => 'Contact Status',
                    'contact_status.*.delete' => 'Contact Status',
                    'contact_status.*.restore' => 'Contact Status',
                    'contact_status.*.force-delete' => 'Contact Status',
                    'consent_agreement.view-any' => 'Consent Agreement',
                    'consent_agreement.*.view' => 'Consent Agreement',
                    'consent_agreement.*.update' => 'Consent Agreement',
                    'role.view-any' => 'Role',
                    'role.*.view' => 'Role',
                    'permission.view-any' => 'Permission',
                    'permission.*.view' => 'Permission',
                    'license.view-any' => 'License',
                    'license.create' => 'License',
                    'license.*.view' => 'License',
                    'license.*.update' => 'License',
                    'license.*.delete' => 'License',
                    'license.*.restore' => 'License',
                    'license.*.force-delete' => 'License',
                    'audit.view-any' => 'Audit',
                    'audit.create' => 'Audit',
                    'audit.*.view' => 'Audit',
                    'audit.*.update' => 'Audit',
                    'audit.*.delete' => 'Audit',
                    'audit.*.restore' => 'Audit',
                    'audit.*.force-delete' => 'Audit',
                    'assistant_chat.view-any' => 'Assistant Chat',
                    'assistant_chat.create' => 'Assistant Chat',
                    'assistant_chat.*.view' => 'Assistant Chat',
                    'assistant_chat.*.update' => 'Assistant Chat',
                    'assistant_chat.*.delete' => 'Assistant Chat',
                    'assistant_chat.*.restore' => 'Assistant Chat',
                    'assistant_chat.*.force-delete' => 'Assistant Chat',
                    'assistant_chat_message.view-any' => 'Assistant Chat Message',
                    'assistant_chat_message.create' => 'Assistant Chat Message',
                    'assistant_chat_message.*.view' => 'Assistant Chat Message',
                    'assistant_chat_message.*.update' => 'Assistant Chat Message',
                    'assistant_chat_message.*.delete' => 'Assistant Chat Message',
                    'assistant_chat_message.*.restore' => 'Assistant Chat Message',
                    'assistant_chat_message.*.force-delete' => 'Assistant Chat Message',
                    'assistant_chat_message_log.view-any' => 'Assistant Chat Message Log',
                    'assistant_chat_message_log.*.view' => 'Assistant Chat Message Log',
                    'assistant_chat_folder.view-any' => 'Assistant Chat Folder',
                    'assistant_chat_folder.create' => 'Assistant Chat Folder',
                    'assistant_chat_folder.*.view' => 'Assistant Chat Folder',
                    'assistant_chat_folder.*.update' => 'Assistant Chat Folder',
                    'assistant_chat_folder.*.delete' => 'Assistant Chat Folder',
                    'assistant_chat_folder.*.restore' => 'Assistant Chat Folder',
                    'assistant_chat_folder.*.force-delete' => 'Assistant Chat Folder',
                    'prompt_type.view-any' => 'Prompt Type',
                    'prompt_type.create' => 'Prompt Type',
                    'prompt_type.*.view' => 'Prompt Type',
                    'prompt_type.*.update' => 'Prompt Type',
                    'prompt_type.*.delete' => 'Prompt Type',
                    'prompt_type.*.restore' => 'Prompt Type',
                    'prompt_type.*.force-delete' => 'Prompt Type',
                    'prompt.view-any' => 'Prompt',
                    'prompt.create' => 'Prompt',
                    'prompt.*.view' => 'Prompt',
                    'prompt.*.update' => 'Prompt',
                    'prompt.*.delete' => 'Prompt',
                    'prompt.*.restore' => 'Prompt',
                    'prompt.*.force-delete' => 'Prompt',
                    'alert.view-any' => 'Alert',
                    'alert.create' => 'Alert',
                    'alert.*.view' => 'Alert',
                    'alert.*.update' => 'Alert',
                    'alert.*.delete' => 'Alert',
                    'alert.*.restore' => 'Alert',
                    'alert.*.force-delete' => 'Alert',
                    'assistant.access' => 'Assistant',
                    'assistant.access_ai_settings' => 'Assistant',
                    'audit.view_audit_settings' => 'Audit',
                    'authorization.impersonate' => 'Authorization',
                    'authorization.view_product_health_dashboard' => 'Authorization',
                    'authorization.view_dashboard' => 'Authorization',
                    'authorization.view_api_documentation' => 'Authorization',
                    'authorization.view_azure_sso_settings' => 'Authorization',
                    'authorization.view_google_sso_settings' => 'Authorization',
                    'in-app-communication.realtime-chat.access' => 'In-App Communication',
                    'integration-aws-ses-event-handling.view_ses_settings' => 'Integration: AWS SES Event Handling',
                    'integration-google-analytics.view_google_analytics_settings' => 'Integration: Google Analytics',
                    'integration-google-recaptcha.view_google_recaptcha_settings' => 'Integration: Google reCAPTCHA',
                    'integration-microsoft-clarity.view_microsoft_clarity_settings' => 'Integration: Microsoft Clarity',
                    'integration-twilio.view_twilio_settings' => 'Integration: Twilio',
                    'portal.view_portal_settings' => 'Portal',
                    'report.access_assistant' => 'Report',
                    'report.access_assistant_settings' => 'Report',
                    'theme.view_theme_settings' => 'Theme',
                    'timeline.access' => 'Timeline',
                ],
                keys: DB::table('permissions')
                    ->where('guard_name', 'web')
                    ->pluck('name')
                    ->all(),
            ),
            guardName: 'web'
        );

        $this->createPermissions(
            Arr::except(
                [
                    'notification_setting.view-any' => 'Notification Setting',
                    'notification_setting.create' => 'Notification Setting',
                    'notification_setting.*.view' => 'Notification Setting',
                    'notification_setting.*.update' => 'Notification Setting',
                    'notification_setting.*.delete' => 'Notification Setting',
                    'notification_setting.*.restore' => 'Notification Setting',
                    'notification_setting.*.force-delete' => 'Notification Setting',
                    'pronouns.view-any' => 'Pronouns',
                    'pronouns.create' => 'Pronouns',
                    'pronouns.*.view' => 'Pronouns',
                    'pronouns.*.update' => 'Pronouns',
                    'pronouns.*.delete' => 'Pronouns',
                    'pronouns.*.restore' => 'Pronouns',
                    'pronouns.*.force-delete' => 'Pronouns',
                    'system_user.view-any' => 'System User',
                    'system_user.create' => 'System User',
                    'system_user.*.view' => 'System User',
                    'system_user.*.update' => 'System User',
                    'system_user.*.delete' => 'System User',
                    'system_user.*.restore' => 'System User',
                    'system_user.*.force-delete' => 'System User',
                    'user.view-email' => 'User',
                    'user.view-any' => 'User',
                    'user.create' => 'User',
                    'user.*.view' => 'User',
                    'user.*.update' => 'User',
                    'user.*.delete' => 'User',
                    'user.*.restore' => 'User',
                    'user.*.force-delete' => 'User',
                    'timeline.view-any' => 'Timeline',
                    'timeline.create' => 'Timeline',
                    'timeline.*.view' => 'Timeline',
                    'timeline.*.update' => 'Timeline',
                    'timeline.*.delete' => 'Timeline',
                    'timeline.*.restore' => 'Timeline',
                    'timeline.*.force-delete' => 'Timeline',
                    'team.view-any' => 'Team',
                    'team.create' => 'Team',
                    'team.*.view' => 'Team',
                    'team.*.update' => 'Team',
                    'team.*.delete' => 'Team',
                    'team.*.restore' => 'Team',
                    'team.*.force-delete' => 'Team',
                    'task.view-any' => 'Task',
                    'task.create' => 'Task',
                    'task.*.view' => 'Task',
                    'task.*.update' => 'Task',
                    'task.*.delete' => 'Task',
                    'task.*.restore' => 'Task',
                    'task.*.force-delete' => 'Task',
                    'survey.view-any' => 'Survey',
                    'survey.create' => 'Survey',
                    'survey.*.view' => 'Survey',
                    'survey.*.update' => 'Survey',
                    'survey.*.delete' => 'Survey',
                    'survey.*.restore' => 'Survey',
                    'survey.*.force-delete' => 'Survey',
                    'change_request_response.view-any' => 'Change Request Response',
                    'change_request_response.create' => 'Change Request Response',
                    'change_request_response.*.view' => 'Change Request Response',
                    'change_request_response.*.update' => 'Change Request Response',
                    'change_request_response.*.delete' => 'Change Request Response',
                    'change_request_response.*.restore' => 'Change Request Response',
                    'change_request_response.*.force-delete' => 'Change Request Response',
                    'change_request_status.view-any' => 'Change Request Status',
                    'change_request_status.create' => 'Change Request Status',
                    'change_request_status.*.view' => 'Change Request Status',
                    'change_request_status.*.update' => 'Change Request Status',
                    'change_request_status.*.delete' => 'Change Request Status',
                    'change_request_status.*.restore' => 'Change Request Status',
                    'change_request_status.*.force-delete' => 'Change Request Status',
                    'change_request_type.view-any' => 'Change Request Type',
                    'change_request_type.create' => 'Change Request Type',
                    'change_request_type.*.view' => 'Change Request Type',
                    'change_request_type.*.update' => 'Change Request Type',
                    'change_request_type.*.delete' => 'Change Request Type',
                    'change_request_type.*.restore' => 'Change Request Type',
                    'change_request_type.*.force-delete' => 'Change Request Type',
                    'change_request.view-any' => 'Change Request',
                    'change_request.create' => 'Change Request',
                    'change_request.*.view' => 'Change Request',
                    'change_request.*.update' => 'Change Request',
                    'change_request.*.delete' => 'Change Request',
                    'change_request.*.restore' => 'Change Request',
                    'change_request.*.force-delete' => 'Change Request',
                    'service_request_assignment.view-any' => 'Service Request Assignment',
                    'service_request_assignment.create' => 'Service Request Assignment',
                    'service_request_assignment.*.view' => 'Service Request Assignment',
                    'service_request_assignment.*.update' => 'Service Request Assignment',
                    'service_request_assignment.*.delete' => 'Service Request Assignment',
                    'service_request_assignment.*.restore' => 'Service Request Assignment',
                    'service_request_assignment.*.force-delete' => 'Service Request Assignment',
                    'service_request_form.view-any' => 'Service Request Form',
                    'service_request_form.create' => 'Service Request Form',
                    'service_request_form.*.view' => 'Service Request Form',
                    'service_request_form.*.update' => 'Service Request Form',
                    'service_request_form.*.delete' => 'Service Request Form',
                    'service_request_form.*.restore' => 'Service Request Form',
                    'service_request_form.*.force-delete' => 'Service Request Form',
                    'service_request_history.view-any' => 'Service Request History',
                    'service_request_history.create' => 'Service Request History',
                    'service_request_history.*.view' => 'Service Request History',
                    'service_request_history.*.update' => 'Service Request History',
                    'service_request_history.*.delete' => 'Service Request History',
                    'service_request_history.*.restore' => 'Service Request History',
                    'service_request_history.*.force-delete' => 'Service Request History',
                    'service_request_priority.view-any' => 'Service Request Priority',
                    'service_request_priority.create' => 'Service Request Priority',
                    'service_request_priority.*.view' => 'Service Request Priority',
                    'service_request_priority.*.update' => 'Service Request Priority',
                    'service_request_priority.*.delete' => 'Service Request Priority',
                    'service_request_priority.*.restore' => 'Service Request Priority',
                    'service_request_priority.*.force-delete' => 'Service Request Priority',
                    'service_request_status.view-any' => 'Service Request Status',
                    'service_request_status.create' => 'Service Request Status',
                    'service_request_status.*.view' => 'Service Request Status',
                    'service_request_status.*.update' => 'Service Request Status',
                    'service_request_status.*.delete' => 'Service Request Status',
                    'service_request_status.*.restore' => 'Service Request Status',
                    'service_request_status.*.force-delete' => 'Service Request Status',
                    'service_request_type.view-any' => 'Service Request Type',
                    'service_request_type.create' => 'Service Request Type',
                    'service_request_type.*.view' => 'Service Request Type',
                    'service_request_type.*.update' => 'Service Request Type',
                    'service_request_type.*.delete' => 'Service Request Type',
                    'service_request_type.*.restore' => 'Service Request Type',
                    'service_request_type.*.force-delete' => 'Service Request Type',
                    'service_request_update.view-any' => 'Service Request Update',
                    'service_request_update.create' => 'Service Request Update',
                    'service_request_update.*.view' => 'Service Request Update',
                    'service_request_update.*.update' => 'Service Request Update',
                    'service_request_update.*.delete' => 'Service Request Update',
                    'service_request_update.*.restore' => 'Service Request Update',
                    'service_request_update.*.force-delete' => 'Service Request Update',
                    'service_request.view-any' => 'Service Request',
                    'service_request.create' => 'Service Request',
                    'service_request.*.view' => 'Service Request',
                    'service_request.*.update' => 'Service Request',
                    'service_request.*.delete' => 'Service Request',
                    'service_request.*.restore' => 'Service Request',
                    'service_request.*.force-delete' => 'Service Request',
                    'sla.view-any' => 'SLA',
                    'sla.create' => 'SLA',
                    'sla.*.view' => 'SLA',
                    'sla.*.update' => 'SLA',
                    'sla.*.delete' => 'SLA',
                    'sla.*.restore' => 'SLA',
                    'sla.*.force-delete' => 'SLA',
                    'report.view-any' => 'Report',
                    'report.create' => 'Report',
                    'report.*.view' => 'Report',
                    'report.*.update' => 'Report',
                    'report.*.delete' => 'Report',
                    'report.*.restore' => 'Report',
                    'report.*.force-delete' => 'Report',
                    'subscription.view-any' => 'Subscription',
                    'subscription.create' => 'Subscription',
                    'subscription.*.view' => 'Subscription',
                    'subscription.*.update' => 'Subscription',
                    'subscription.*.delete' => 'Subscription',
                    'subscription.*.restore' => 'Subscription',
                    'subscription.*.force-delete' => 'Subscription',
                    'outbound_deliverable.view-any' => 'Outbound Deliverable',
                    'outbound_deliverable.create' => 'Outbound Deliverable',
                    'outbound_deliverable.*.view' => 'Outbound Deliverable',
                    'outbound_deliverable.*.update' => 'Outbound Deliverable',
                    'outbound_deliverable.*.delete' => 'Outbound Deliverable',
                    'outbound_deliverable.*.restore' => 'Outbound Deliverable',
                    'outbound_deliverable.*.force-delete' => 'Outbound Deliverable',
                    'knowledge_base_item.view-any' => 'Knowledge Base Item',
                    'knowledge_base_item.create' => 'Knowledge Base Item',
                    'knowledge_base_item.*.view' => 'Knowledge Base Item',
                    'knowledge_base_item.*.update' => 'Knowledge Base Item',
                    'knowledge_base_item.*.delete' => 'Knowledge Base Item',
                    'knowledge_base_item.*.restore' => 'Knowledge Base Item',
                    'knowledge_base_item.*.force-delete' => 'Knowledge Base Item',
                    'knowledge_base_category.view-any' => 'Knowledge Base Category',
                    'knowledge_base_category.create' => 'Knowledge Base Category',
                    'knowledge_base_category.*.view' => 'Knowledge Base Category',
                    'knowledge_base_category.*.update' => 'Knowledge Base Category',
                    'knowledge_base_category.*.delete' => 'Knowledge Base Category',
                    'knowledge_base_category.*.restore' => 'Knowledge Base Category',
                    'knowledge_base_category.*.force-delete' => 'Knowledge Base Category',
                    'knowledge_base_quality.view-any' => 'Knowledge Base Quality',
                    'knowledge_base_quality.create' => 'Knowledge Base Quality',
                    'knowledge_base_quality.*.view' => 'Knowledge Base Quality',
                    'knowledge_base_quality.*.update' => 'Knowledge Base Quality',
                    'knowledge_base_quality.*.delete' => 'Knowledge Base Quality',
                    'knowledge_base_quality.*.restore' => 'Knowledge Base Quality',
                    'knowledge_base_quality.*.force-delete' => 'Knowledge Base Quality',
                    'knowledge_base_status.view-any' => 'Knowledge Base Status',
                    'knowledge_base_status.create' => 'Knowledge Base Status',
                    'knowledge_base_status.*.view' => 'Knowledge Base Status',
                    'knowledge_base_status.*.update' => 'Knowledge Base Status',
                    'knowledge_base_status.*.delete' => 'Knowledge Base Status',
                    'knowledge_base_status.*.restore' => 'Knowledge Base Status',
                    'knowledge_base_status.*.force-delete' => 'Knowledge Base Status',
                    'asset_check_in.view-any' => 'Asset Check In',
                    'asset_check_in.create' => 'Asset Check In',
                    'asset_check_in.*.view' => 'Asset Check In',
                    'asset_check_in.*.update' => 'Asset Check In',
                    'asset_check_in.*.delete' => 'Asset Check In',
                    'asset_check_in.*.restore' => 'Asset Check In',
                    'asset_check_in.*.force-delete' => 'Asset Check In',
                    'asset_check_out.view-any' => 'Asset Check Out',
                    'asset_check_out.create' => 'Asset Check Out',
                    'asset_check_out.*.view' => 'Asset Check Out',
                    'asset_check_out.*.update' => 'Asset Check Out',
                    'asset_check_out.*.delete' => 'Asset Check Out',
                    'asset_check_out.*.restore' => 'Asset Check Out',
                    'asset_check_out.*.force-delete' => 'Asset Check Out',
                    'asset_location.view-any' => 'Asset Location',
                    'asset_location.create' => 'Asset Location',
                    'asset_location.*.view' => 'Asset Location',
                    'asset_location.*.update' => 'Asset Location',
                    'asset_location.*.delete' => 'Asset Location',
                    'asset_location.*.restore' => 'Asset Location',
                    'asset_location.*.force-delete' => 'Asset Location',
                    'asset_status.view-any' => 'Asset Status',
                    'asset_status.create' => 'Asset Status',
                    'asset_status.*.view' => 'Asset Status',
                    'asset_status.*.update' => 'Asset Status',
                    'asset_status.*.delete' => 'Asset Status',
                    'asset_status.*.restore' => 'Asset Status',
                    'asset_status.*.force-delete' => 'Asset Status',
                    'asset_type.view-any' => 'Asset Type',
                    'asset_type.create' => 'Asset Type',
                    'asset_type.*.view' => 'Asset Type',
                    'asset_type.*.update' => 'Asset Type',
                    'asset_type.*.delete' => 'Asset Type',
                    'asset_type.*.restore' => 'Asset Type',
                    'asset_type.*.force-delete' => 'Asset Type',
                    'asset.view-any' => 'Asset',
                    'asset.create' => 'Asset',
                    'asset.*.view' => 'Asset',
                    'asset.*.update' => 'Asset',
                    'asset.*.delete' => 'Asset',
                    'asset.*.restore' => 'Asset',
                    'asset.*.force-delete' => 'Asset',
                    'maintenance_activity.view-any' => 'Maintenance Activity',
                    'maintenance_activity.create' => 'Maintenance Activity',
                    'maintenance_activity.*.view' => 'Maintenance Activity',
                    'maintenance_activity.*.update' => 'Maintenance Activity',
                    'maintenance_activity.*.delete' => 'Maintenance Activity',
                    'maintenance_activity.*.restore' => 'Maintenance Activity',
                    'maintenance_activity.*.force-delete' => 'Maintenance Activity',
                    'maintenance_provider.view-any' => 'Maintenance Provider',
                    'maintenance_provider.create' => 'Maintenance Provider',
                    'maintenance_provider.*.view' => 'Maintenance Provider',
                    'maintenance_provider.*.update' => 'Maintenance Provider',
                    'maintenance_provider.*.delete' => 'Maintenance Provider',
                    'maintenance_provider.*.restore' => 'Maintenance Provider',
                    'maintenance_provider.*.force-delete' => 'Maintenance Provider',
                    'email_template.view-any' => 'Email Template',
                    'email_template.create' => 'Email Template',
                    'email_template.*.view' => 'Email Template',
                    'email_template.*.update' => 'Email Template',
                    'email_template.*.delete' => 'Email Template',
                    'email_template.*.restore' => 'Email Template',
                    'email_template.*.force-delete' => 'Email Template',
                    'engagement_batch.view-any' => 'Engagement Batch',
                    'engagement_batch.create' => 'Engagement Batch',
                    'engagement_batch.*.view' => 'Engagement Batch',
                    'engagement_batch.*.update' => 'Engagement Batch',
                    'engagement_batch.*.delete' => 'Engagement Batch',
                    'engagement_batch.*.restore' => 'Engagement Batch',
                    'engagement_batch.*.force-delete' => 'Engagement Batch',
                    'engagement_deliverable.view-any' => 'Engagement Deliverable',
                    'engagement_deliverable.create' => 'Engagement Deliverable',
                    'engagement_deliverable.*.view' => 'Engagement Deliverable',
                    'engagement_deliverable.*.update' => 'Engagement Deliverable',
                    'engagement_deliverable.*.delete' => 'Engagement Deliverable',
                    'engagement_deliverable.*.restore' => 'Engagement Deliverable',
                    'engagement_deliverable.*.force-delete' => 'Engagement Deliverable',
                    'engagement_file.view-any' => 'Engagement File',
                    'engagement_file.create' => 'Engagement File',
                    'engagement_file.*.view' => 'Engagement File',
                    'engagement_file.*.update' => 'Engagement File',
                    'engagement_file.*.delete' => 'Engagement File',
                    'engagement_file.*.restore' => 'Engagement File',
                    'engagement_file.*.force-delete' => 'Engagement File',
                    'engagement_response.view-any' => 'Engagement Response',
                    'engagement_response.create' => 'Engagement Response',
                    'engagement_response.*.view' => 'Engagement Response',
                    'engagement_response.*.update' => 'Engagement Response',
                    'engagement_response.*.delete' => 'Engagement Response',
                    'engagement_response.*.restore' => 'Engagement Response',
                    'engagement_response.*.force-delete' => 'Engagement Response',
                    'engagement.view-any' => 'Engagement',
                    'engagement.create' => 'Engagement',
                    'engagement.*.view' => 'Engagement',
                    'engagement.*.update' => 'Engagement',
                    'engagement.*.delete' => 'Engagement',
                    'engagement.*.restore' => 'Engagement',
                    'engagement.*.force-delete' => 'Engagement',
                    'sms_template.view-any' => 'SMS Template',
                    'sms_template.create' => 'SMS Template',
                    'sms_template.*.view' => 'SMS Template',
                    'sms_template.*.update' => 'SMS Template',
                    'sms_template.*.delete' => 'SMS Template',
                    'sms_template.*.restore' => 'SMS Template',
                    'sms_template.*.force-delete' => 'SMS Template',
                    'division.view-any' => 'Division',
                    'division.create' => 'Division',
                    'division.*.view' => 'Division',
                    'division.*.update' => 'Division',
                    'division.*.delete' => 'Division',
                    'division.*.restore' => 'Division',
                    'division.*.force-delete' => 'Division',
                    'contact.view-any' => 'Contact',
                    'contact.create' => 'Contact',
                    'contact.*.view' => 'Contact',
                    'contact.*.update' => 'Contact',
                    'contact.*.delete' => 'Contact',
                    'contact.*.restore' => 'Contact',
                    'contact.*.force-delete' => 'Contact',
                    'contact_source.view-any' => 'Contact Source',
                    'contact_source.create' => 'Contact Source',
                    'contact_source.*.view' => 'Contact Source',
                    'contact_source.*.update' => 'Contact Source',
                    'contact_source.*.delete' => 'Contact Source',
                    'contact_source.*.restore' => 'Contact Source',
                    'contact_source.*.force-delete' => 'Contact Source',
                    'contact_status.view-any' => 'Contact Status',
                    'contact_status.create' => 'Contact Status',
                    'contact_status.*.view' => 'Contact Status',
                    'contact_status.*.update' => 'Contact Status',
                    'contact_status.*.delete' => 'Contact Status',
                    'contact_status.*.restore' => 'Contact Status',
                    'contact_status.*.force-delete' => 'Contact Status',
                    'consent_agreement.view-any' => 'Consent Agreement',
                    'consent_agreement.*.view' => 'Consent Agreement',
                    'consent_agreement.*.update' => 'Consent Agreement',
                    'license.view-any' => 'License',
                    'license.create' => 'License',
                    'license.*.view' => 'License',
                    'license.*.update' => 'License',
                    'license.*.delete' => 'License',
                    'license.*.restore' => 'License',
                    'license.*.force-delete' => 'License',
                    'audit.view-any' => 'Audit',
                    'audit.create' => 'Audit',
                    'audit.*.view' => 'Audit',
                    'audit.*.update' => 'Audit',
                    'audit.*.delete' => 'Audit',
                    'audit.*.restore' => 'Audit',
                    'audit.*.force-delete' => 'Audit',
                    'assistant_chat.view-any' => 'Assistant Chat',
                    'assistant_chat.create' => 'Assistant Chat',
                    'assistant_chat.*.view' => 'Assistant Chat',
                    'assistant_chat.*.update' => 'Assistant Chat',
                    'assistant_chat.*.delete' => 'Assistant Chat',
                    'assistant_chat.*.restore' => 'Assistant Chat',
                    'assistant_chat.*.force-delete' => 'Assistant Chat',
                    'assistant_chat_message.view-any' => 'Assistant Chat Message',
                    'assistant_chat_message.create' => 'Assistant Chat Message',
                    'assistant_chat_message.*.view' => 'Assistant Chat Message',
                    'assistant_chat_message.*.update' => 'Assistant Chat Message',
                    'assistant_chat_message.*.delete' => 'Assistant Chat Message',
                    'assistant_chat_message.*.restore' => 'Assistant Chat Message',
                    'assistant_chat_message.*.force-delete' => 'Assistant Chat Message',
                    'assistant_chat_message_log.view-any' => 'Assistant Chat Message Log',
                    'assistant_chat_message_log.*.view' => 'Assistant Chat Message Log',
                    'assistant_chat_folder.view-any' => 'Assistant Chat Folder',
                    'assistant_chat_folder.create' => 'Assistant Chat Folder',
                    'assistant_chat_folder.*.view' => 'Assistant Chat Folder',
                    'assistant_chat_folder.*.update' => 'Assistant Chat Folder',
                    'assistant_chat_folder.*.delete' => 'Assistant Chat Folder',
                    'assistant_chat_folder.*.restore' => 'Assistant Chat Folder',
                    'assistant_chat_folder.*.force-delete' => 'Assistant Chat Folder',
                    'prompt_type.view-any' => 'Prompt Type',
                    'prompt_type.create' => 'Prompt Type',
                    'prompt_type.*.view' => 'Prompt Type',
                    'prompt_type.*.update' => 'Prompt Type',
                    'prompt_type.*.delete' => 'Prompt Type',
                    'prompt_type.*.restore' => 'Prompt Type',
                    'prompt_type.*.force-delete' => 'Prompt Type',
                    'prompt.view-any' => 'Prompt',
                    'prompt.create' => 'Prompt',
                    'prompt.*.view' => 'Prompt',
                    'prompt.*.update' => 'Prompt',
                    'prompt.*.delete' => 'Prompt',
                    'prompt.*.restore' => 'Prompt',
                    'prompt.*.force-delete' => 'Prompt',
                    'alert.view-any' => 'Alert',
                    'alert.create' => 'Alert',
                    'alert.*.view' => 'Alert',
                    'alert.*.update' => 'Alert',
                    'alert.*.delete' => 'Alert',
                    'alert.*.restore' => 'Alert',
                    'alert.*.force-delete' => 'Alert',
                ],
                keys: DB::table('permissions')
                    ->where('guard_name', 'api')
                    ->pluck('name')
                    ->all(),
            ),
            guardName: 'api'
        );
    }

    public function down(): void
    {
        DB::table('permissions')->truncate();
    }
};
