<?php
namespace SabaiApps\Directories\Component\Payment\Feature;

use SabaiApps\Directories\Component\Payment\IPlan;
use SabaiApps\Directories\Component\Entity\Model\Bundle;
use SabaiApps\Directories\Component\Entity\Type\IEntity;

interface IFeature {

	public function paymentFeatureInfo( $key = null );
	public function paymentFeatureSettings( Bundle $bundle, $planType = 'base' );
	public function paymentFeatureSupports( Bundle $bundle, $planType = 'base' );
	public function paymentFeatureSettingsForm( Bundle $bundle, array $settings, $planType = 'base', array $parents = array() );
	public function paymentFeatureIsEnabled( Bundle $bundle, array $settings );
	public function paymentFeatureOnEntityForm( Bundle $bundle, array $settings, array &$form, ?IEntity $entity = null, $isAdmin = false );
	public function paymentFeatureOnEntityFieldValues( IEntity $entity, Bundle $bundle, array $settings );
	public function paymentFeatureOnAdded( IEntity $entity, array $settings, IPlan $plan, array &$values );
	public function paymentFeatureApply( IEntity $entity, $featureName, array $featureSettings, array &$values, $orderId, $isAddon = false );
	public function paymentFeatureUnapply( IEntity $entity, $featureName, array $featureSettings, array &$values, $orderId, $isAddon = false );
	public function paymentFeatureRender( Bundle $bundle, array $settings, ?IPlan $plan = null );
}
