import type { ButtonBaseProps as MuiButtonBaseProps, ButtonProps as MuiButtonProps, FabProps as MuiFabProps, IconButtonProps as MuiIconButtonProps, LinkProps as MuiLinkProps } from '@mui/material'; import { type NextLinkProps } from './next-link'; export type AppLinkVariant = 'naked' | 'button' | 'button-base' | 'icon-button' | 'fab' | 'text' | 'default' | undefined | never; type BaseLinkProps = Omit & { /** * Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains * `noopener noreferrer`, and the accessible name ends with * "(opens in a new tab)". Every Preview / View / Visit link sets this — * see `utils/new-tab`. */ newTab?: boolean; }; export type ButtonBaseProps = MuiButtonBaseProps; export type ButtonProps = MuiButtonProps; export type DefaultProps = TextProps; export type FabProps = MuiFabProps; export type IconButtonProps = MuiIconButtonProps; export type NakedProps = MuiLinkProps; export type TextProps = MuiLinkProps; export type AppLinkVariantDefault = Extract; export type AppLinkProps = T extends string ? T extends AppLinkVariant ? T extends AppLinkVariantDefault ? DefaultProps & { componentVariant?: T; } : T extends 'button' ? ButtonProps & { componentVariant: T; } : T extends 'button-base' ? ButtonBaseProps & { componentVariant: T; } : T extends 'icon-button' ? IconButtonProps & { componentVariant: T; } : T extends 'fab' ? FabProps & { componentVariant: T; } : T extends 'naked' ? NakedProps & { componentVariant: T; } : never : never : DefaultProps & { componentVariant?: undefined | never; }; export type AppLinkSimpleLinkProps = AppLinkProps; export type AppLinkNakedLinkProps = AppLinkProps<'naked'>; export type AppLinkButtonProps = AppLinkProps<'button'>; export type AppLinkButtonBaseProps = AppLinkProps<'button-base'>; export type AppLinkIconButtonProps = AppLinkProps<'icon-button'>; export type AppLinkFabProps = AppLinkProps<'fab'>; export declare const appLinkClassKey: import("@aglyn/shared-ui-theme").ClassKeyMap<"disabled" | "active" | "activeAsAncestor" | "variantButton" | "variantButtonBase" | "variantDefault" | "variantFab" | "variantIconButton" | "variantNaked" | "variantText", "AglynAppLink">; /** * A Material-UI styled version of a "composed" Next.js Link. * * Specify the `componentVariant` props to conditionally render output element * componentVariant === 'naked' = NextLink * componentVariant === 'button' = MuiButton * componentVariant === any = MuiLink */ declare const AppLink: import("react").ForwardRefExoticComponent<(Omit & { /** * Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains * `noopener noreferrer`, and the accessible name ends with * "(opens in a new tab)". Every Preview / View / Visit link sets this — * see `utils/new-tab`. */ newTab?: boolean; } & import("@mui/material").LinkOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit & { component?: React.ElementType | undefined; } & { componentVariant?: "text"; }, "ref"> | Omit & { /** * Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains * `noopener noreferrer`, and the accessible name ends with * "(opens in a new tab)". Every Preview / View / Visit link sets this — * see `utils/new-tab`. */ newTab?: boolean; } & import("@mui/material").LinkOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit & { component?: React.ElementType | undefined; } & { componentVariant?: "default"; }, "ref"> | Omit & { /** * Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains * `noopener noreferrer`, and the accessible name ends with * "(opens in a new tab)". Every Preview / View / Visit link sets this — * see `utils/new-tab`. */ newTab?: boolean; } & import("@mui/material").LinkOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit & { component?: React.ElementType | undefined; } & { componentVariant: "naked"; }, "ref"> | Omit & { /** * Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains * `noopener noreferrer`, and the accessible name ends with * "(opens in a new tab)". Every Preview / View / Visit link sets this — * see `utils/new-tab`. */ newTab?: boolean; } & import("@mui/material").ButtonOwnProps & Omit & import("@mui/material/OverridableComponent").CommonProps & Omit & { component?: React.ElementType | undefined; } & { componentVariant: "button"; }, "ref"> | Omit & { /** * Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains * `noopener noreferrer`, and the accessible name ends with * "(opens in a new tab)". Every Preview / View / Visit link sets this — * see `utils/new-tab`. */ newTab?: boolean; } & import("@mui/material").ButtonBaseOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit & { component?: React.ElementType | undefined; } & { componentVariant: "button-base"; }, "ref"> | Omit & { /** * Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains * `noopener noreferrer`, and the accessible name ends with * "(opens in a new tab)". Every Preview / View / Visit link sets this — * see `utils/new-tab`. */ newTab?: boolean; } & import("@mui/material").IconButtonOwnProps & Omit & import("@mui/material/OverridableComponent").CommonProps & Omit & { component?: React.ElementType | undefined; } & { componentVariant: "icon-button"; }, "ref"> | Omit & { /** * Open in a new tab (AGL-3660): `target="_blank"`, `rel` gains * `noopener noreferrer`, and the accessible name ends with * "(opens in a new tab)". Every Preview / View / Visit link sets this — * see `utils/new-tab`. */ newTab?: boolean; } & import("@mui/material").FabOwnProps & Omit & import("@mui/material/OverridableComponent").CommonProps & Omit & { component?: React.ElementType | undefined; } & { componentVariant: "fab"; }, "ref">) & import("react").RefAttributes>; type AppLink = typeof AppLink; export { AppLink }; export default AppLink;