import { BooleanValue, NumberValue, RecordValue, Schema, StringValue, } from '@coveo/bueno';
import { requiredNonEmptyString } from '../../../utils/validate-payload.js';
export const defaultSearchBoxOptions = {
    enableQuerySyntax: false,
    numberOfSuggestions: 5,
    clearFilters: true,
};
export const openCloseDelimitersDefinition = {
    open: new StringValue(),
    close: new StringValue(),
};
export const searchBoxOptionDefinitions = {
    id: requiredNonEmptyString,
    numberOfSuggestions: new NumberValue({ min: 0 }),
    enableQuerySyntax: new BooleanValue(),
    highlightOptions: new RecordValue({
        values: {
            notMatchDelimiters: new RecordValue({
                values: openCloseDelimitersDefinition,
            }),
            exactMatchDelimiters: new RecordValue({
                values: openCloseDelimitersDefinition,
            }),
            correctionDelimiters: new RecordValue({
                values: openCloseDelimitersDefinition,
            }),
        },
    }),
    clearFilters: new BooleanValue(),
};
export const searchBoxOptionsSchema = new Schema(searchBoxOptionDefinitions);
