import type { CoreEngine } from '../../../../../app/engine.js';
import type { DateRangeRequest } from '../../../../../features/facets/range-facets/date-facet-set/interfaces/request.js';
import type { DateFacetValue } from '../../../../../features/facets/range-facets/date-facet-set/interfaces/response.js';
import type { RangeFacetSortCriterion } from '../../../../../features/facets/range-facets/generic/interfaces/request.js';
import type { Controller } from '../../../../controller/headless-controller.js';
import { buildDateRange, type DateRangeInput, type DateRangeOptions } from './date-range.js';
import { type DateFacetOptions } from './headless-date-facet-options.js';
export type { DateFacetOptions, DateRangeInput, DateRangeOptions, DateRangeRequest, };
export { buildDateRange };
export interface DateFacetProps {
    /**
     * The options for the `DateFacet` controller.
     * */
    options: DateFacetOptions;
}
/**
 * The `DateFacet` controller makes it possible to create a facet with date ranges.
 *
 * Examples:
 * - [date-facet.fn.tsx](https://github.com/coveo/ui-kit/blob/main/packages/samples/headless-react/src/components/date-facet/date-facet.fn.tsx)
 * - [relative-date-facet.fn.tsx](https://github.com/coveo/ui-kit/blob/main/packages/samples/headless-react/src/components/relative-date-facet/relative-date-facet.fn.tsx)
 *
 * @document relative-date-format.md
 *
 * @group Controllers
 * @category DateFacet
 * */
export interface DateFacet extends Controller {
    /**
     * Deselects all facet values.
     */
    deselectAll(): void;
    /**
     * Checks whether the facet values are sorted according to the specified criterion.
     *
     * @param criterion - The criterion to compare.
     * @returns Whether the facet values are sorted according to the specified criterion.
     */
    isSortedBy(criterion: RangeFacetSortCriterion): boolean;
    /**
     * Checks whether the specified facet value is selected.
     *
     * @param selection - The facet value to check.
     * @returns Whether the specified facet value is selected.
     */
    isValueSelected(selection: DateFacetValue): boolean;
    /** Sorts the facet values according to the specified criterion.
     *
     * @param criterion - The criterion by which to sort values.
     */
    sortBy(criterion: RangeFacetSortCriterion): void;
    /**
     * Toggles the specified facet value.
     *
     * @param selection - The facet value to toggle.
     */
    toggleSelect(selection: DateFacetValue): void;
    /**
     * Toggles exclusion of the specified facet value
     *
     * @param selection - The facet value to toggle.
     */
    toggleExclude(selection: DateFacetValue): void;
    /**
     * Toggles the specified facet value, deselecting others.
     *
     * @param selection - The facet value to toggle.
     */
    toggleSingleSelect(selection: DateFacetValue): void;
    /**
     * Toggles exclusion of the specified facet value, deselecting others.
     *
     * @param selection - The facet value to toggle.
     */
    toggleSingleExclude(selection: DateFacetValue): void;
    /**
     * Enables the facet. I.e., undoes the effects of `disable`.
     */
    enable(): void;
    /**
     * Disables the facet. I.e., prevents it from filtering results.
     */
    disable(): void;
    /**
     * The state of the `DateFacet` controller.
     */
    state: DateFacetState;
}
/**
 * A scoped and simplified part of the headless state that is relevant to the `DateFacet` controller.
 *
 * @group Controllers
 * @category DateFacet
 */
export interface DateFacetState {
    /**
     * The facet ID.
     * */
    facetId: string;
    /**
     * The values of the facet.
     */
    values: DateFacetValue[];
    /**
     * The active sortCriterion of the facet.
     */
    sortCriterion: RangeFacetSortCriterion;
    /**
     * `true` if a search is in progress and `false` otherwise.
     */
    isLoading: boolean;
    /**
     * `true` if there is at least one non-idle value and `false` otherwise.
     */
    hasActiveValues: boolean;
    /**
     * Whether the facet is enabled and its values are used to filter search results.
     */
    enabled: boolean;
}
/**
 * Creates a `DateFacet` controller instance.
 *
 * @param engine - The headless engine.
 * @param props - The configurable `DateFacet` controller properties.
 * @returns A `DateFacet` controller instance.
 *
 * @group Controllers
 * @category DateFacet
 */
export declare function buildCoreDateFacet(engine: CoreEngine, props: DateFacetProps): DateFacet;
