import { facetOptionLabel } from './utils';
export function createStringFilterGroup({ buckets, name, placeholder, type = 'select', multiple = false }) {
    const options = buckets.map((bucket) => ({
        label: facetOptionLabel(bucket),
        value: bucket._id
    }));
    const filterGroup = {
        name: name,
        options: options,
        type: type,
        multiple: multiple,
        placeholder: `${placeholder ?? `${name.charAt(0).toUpperCase() + name.slice(1)}`}`,
        ...({ allowCreate: false })
    };
    return filterGroup;
}
export function VStringFacet({ buckets, name, placeholder, type, multiple }) {
    return createStringFilterGroup({ buckets, name, placeholder, type, multiple });
}
//# sourceMappingURL=VStringFacet.js.map