<?php

namespace AmbassadorHub\Campaigns;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

use AmbassadorHub\Accounts\AbstractCapabilities;

class CampaignsCapabilities extends AbstractCapabilities {

	public static function admin_caps( $caps ): array {

		$new_caps = array(
			// Primitive caps derived from capability_type => 'ambh_campaign'.
			'edit_ambh_campaign',
			'read_ambh_campaign',
			'delete_ambh_campaign',
			'edit_ambh_campaigns',
			'edit_others_ambh_campaigns',
			'publish_ambh_campaigns',
			'read_private_ambh_campaigns',
			'delete_ambh_campaigns',
			'delete_private_ambh_campaigns',
			'delete_published_ambh_campaigns',
			'delete_others_ambh_campaigns',
			'edit_private_ambh_campaigns',
			'edit_published_ambh_campaigns',
			'create_ambh_campaigns',
		);

		return array_values( array_unique( array_merge( $caps, $new_caps ) ) );
	}

	public static function ambassador_caps( $caps ): array {

		$new_caps = array(
			'read_ambh_campaign',
		);

		return array_values( array_unique( array_merge( $caps, $new_caps ) ) );
	}

	public static function unverified_ambassador_blocked_caps( $caps ): array {
		$new_caps = array(
			'publish_ambh_campaigns',
		);

		return array_values( array_unique( array_merge( $caps, $new_caps ) ) );
	}
}
