<?php

declare(strict_types=1);

namespace FecaMailshots\Application;

interface SourceMetadataProvider
{
    public function sourceExists(string $source): bool;

    /** @return list<string> */
    public function sourceFields(string $source): array;

    public function hasEmailField(string $source): bool;

    /** @return array{left:string,right:string}|null */
    public function joinPath(string $left, string $right): ?array;

    /** @return list<string> */
    public function allKnownSources(): array;

    public function sourceTable(string $source): ?string;

    public function fieldSql(string $source, string $field, string $alias): ?string;
}
