import { ComponentPropsWithRef } from 'react'; import { SavedSearch } from '../../../providers/search-context'; interface Props extends ComponentPropsWithRef<'button'> { /** The inner content/children of the button when the search is saved */ savedInner?: React.ReactNode; /** The inner content/children of the button while waiting for response after saving/unsaving */ loadingInner?: React.ReactNode; /** Optionally pass the search itself, if not passed it will use the initialSearch from Redux */ search?: SavedSearch; /** Optional success callback */ onAdd?: () => void; } /** * When used on a search results page the button will use the search that has been run. * * Optionally a `search` can be explicitly passed, which is useful when listing saved searches in user profile. * * @example * ```tsx * * * Remove Search * * } * loadingInner={} * > * * * Save Search * * ``` */ export default function SaveSearchButton({ children, savedInner, loadingInner, search, onAdd, ...otherProps }: Props): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=save-search-button.component.d.ts.map