<?php

namespace Plugli\Linksy\SearchAndReplace\Admin\Partials\SearchAndReplace\Helpers;

abstract class Helpers
{
    protected $search;
    protected $filters = [];
    protected $filter_mode;

    public function __construct($search = '', $filters = [], $filter_mode = null)
    {
        $this->search = $search;
        $this->filters = $filters;

        if ($filter_mode) {
            $this->filter_mode = $filter_mode;
        }
    }

    abstract public function get(string $search_mode, string $filter_query, array $options = []);
    abstract protected function filterByMode(mixed $item, string $query);
    abstract public function filter(array $data, string $query);
}
