<?php

namespace GeminiLabs\SiteReviews\Contracts;

use GeminiLabs\SiteReviews\Defaults\DefaultsAbstract;

/**
 * @property array  $args
 * @property string $debug
 * @property string $description
 * @property string $from
 * @property string $name
 * @property string $tag
 * @phpstan-require-extends \GeminiLabs\SiteReviews\Shortcodes\Shortcode
 */
interface ShortcodeContract
{
    public function build(array $args = [], string $from = 'shortcode', bool $isWrapped = true): string;

    public function buildTemplate(): string;

    public function classAttr(string $classAttr, bool $isWrapper = false): string;

    public function defaults(): DefaultsAbstract;

    public function description(): string;

    public function hasVisibleFields(array $args = []): bool;

    public function name(): string;

    public function normalize(array $args, string $type = ''): ShortcodeContract;

    /**
     * Returns the options for a shortcode setting. Results are filtered
     * by the "site-reviews/shortcode/options/{$options}" hook.
     */
    public function options(string $option, array $args = []): array;

    public function register(): void;

    /**
     * Returns the filtered shortcode settings configuration.
     */
    public function settings(): array;

    public function tag(): string;

    public function wrap(string $renderedHtml, array $attributes = []): string;
}
