import { html } from "lit";
import { renderButton } from "../button.js";
const renderShowHideButton = ({ props })=>{
    const handleClick = ()=>{
        if (props.moreResultsAvailable) props.loadFullCollection();
        props.toggleShowInitialChildren();
    };
    const buttonText = props.showInitialChildren || props.moreResultsAvailable ? props.loadAllResults : props.collapseResults;
    return renderButton({
        props: {
            part: 'show-hide-button',
            class: 'show-hide-button',
            style: 'text-primary',
            onClick: handleClick
        }
    })(html`${buttonText}`);
};
export { renderShowHideButton };
