<?php
namespace SabaiApps\Directories\Component\Field\Renderer;

use SabaiApps\Directories\Component\Entity\Type\IEntity;
use SabaiApps\Directories\Component\Entity\Model\Bundle;
use SabaiApps\Directories\Component\Field\IField;

interface IRenderer {

	public function fieldRendererInfo( $key = null );
	public function fieldRendererOnRender( IField $field, array $settings );
	public function fieldRendererSettingsForm( IField $field, array $settings, array $parents = array() );
	public function fieldRendererRenderField( IField $field, array &$settings, IEntity $entity, ?array $context = null, ?array $values = null );
	public function fieldRendererIsPreRenderable( IField $field, array $settings );
	public function fieldRendererPreRender( IField $field, array $settings, array $entities = array() );
	public function fieldRendererReadableSettings( IField $field, array $settings );
	public function fieldRendererSupports( Bundle $bundle, IField $field );
	public function fieldRendererSupportsAmp( Bundle $bundle );
	public function fieldRendererAmpSettingsForm( IField $field, array $settings, array $parents = array() );
}
