import { ListableResourceType } from '@commercelayer/sdk'; import { JSX } from 'react'; import { OverlayProps } from '../../internals/Overlay'; export interface SortBy { attribute: string; direction: "asc" | "desc"; } export interface FullListProps { /** * Default values to be shown as selected */ defaultValues: string[]; /** * Resource name from core API to be fetched. * Example: `markets` */ resource: ListableResourceType; /** * Attribute from the resource to be used as label for the checkbox * Example: name, sku_code or email */ fieldForLabel: string; /** * Attribute from the resource to be used as value for the checkbox * Example: id */ fieldForValue: string; /** * Callback invoked on change, it returns the new list of selected values */ onChange: (values: string[]) => void; /** * Optional callback to be triggered when cancel button is pressed. * If missing, the local history will be used to go back (`history.back()`). */ onCancel?: () => void; /** * Value to be used as search predicate when SearchBar is used. * If missing the search bar will not be shown. * It must match the format described in the Core APIs documentation. * {@link https://docs.commercelayer.io/core/filtering-data} * Example: name_cont */ searchBy?: string; /** * Sorting options * * Example: * ```{ attribute: 'name', direction: 'asc'}``` * or * ```{ attribute: 'created_at', direction: 'desc'}``` */ sortBy: SortBy; /** * Title to be shown as main label. * It will be automatically computed with the number of selected items. */ title: string; /** * Show icon in checkbox selectors */ showCheckboxIcon?: boolean; /** * Hide selected items */ hideSelected?: boolean; } export declare function FullList({ defaultValues, fieldForLabel, fieldForValue, onCancel, onChange, resource, searchBy, sortBy, title, showCheckboxIcon, hideSelected, }: FullListProps): JSX.Element; export declare const useInputResourceGroupOverlay: () => { InputResourceGroupOverlay: ({ footer, backgroundColor, ...props }: FullListProps & Omit) => import("react/jsx-runtime").JSX.Element; openInputResourceGroupOverlay: () => void; closeInputResourceGroupOverlay: () => void; };