<?php
declare( strict_types=1 );

namespace FiboFilters\Filters\SourceTypes;

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

interface SourceTypeInterface {
	public function validate_user_input( string $user_input, string $filter_type = '' ): array;

	public function get_data(): array;

	public function analyse_source_values(): void;

	public function set_value_analyse_data( array $data ): void;

	/**
	 * @param string $attr Attribute name.
	 * @return mixed|null
	 */
	public function get_data_attr( string $attr );

	/**
	 * @param string $attr Attribute name.
	 * @param mixed  $value Attribute value.
	 */
	public function set_data_attr( string $attr, $value ): void;

	public function is_analyse_source_values(): bool;

	public function is_calculate_percentage_share(): bool;

	public function get_calculate_percentage_share(): float;
}
