import type { FlexBoxOwnProps } from '../flex-box'; import type { ButtonElementProps } from './types'; /** Icon, label and end icon in one centred row; `block` stretches it to the full width. */ export function buttonLayout(block: boolean | null | undefined) { return { display: block ? 'flex' : 'inline-flex', alignItems: 'items-center', justifyContent: 'justify-center', gap: 'gap-2', } as const satisfies FlexBoxOwnProps; } /** Props only NextLink understands. */ const LINK_ONLY_PROPS = new Set([ 'href', 'as', 'replace', 'scroll', 'shallow', 'passHref', 'prefetch', 'locale', 'legacyBehavior', 'onNavigate', 'unstable_dynamicOnHover', ]); /** A frozen or loading link renders a `