from pydantic import BaseModel

from .models import NumberRange, DateRange


__all__ = (
    "NumberRange",
    "DateRange",
    "FilterSelectValue",
    "FilterOption",
    "SelectedFilter",
    "SearchResponseAvailableFilters",
    "SearchResponseSelectedFilters",
)


class FilterSelectValue(BaseModel):
    label: str
    value: str


class FilterOption(BaseModel):
    label: str
    name: str
    type: str
    value: list[FilterSelectValue] | NumberRange | DateRange | None = None


class SelectedFilter(BaseModel):
    label: str
    name: str
    type: str
    value: str | NumberRange | DateRange | None = None


class SearchResponseAvailableFilters(BaseModel):
    available_filters: list[FilterOption] | None = None


class SearchResponseSelectedFilters(BaseModel):
    selected_filters: list[SelectedFilter] | None = None


