import { Component } from 'vue'; import { Cart, Contact, Customer, GraphQLClient } from '@propeller-commerce/propeller-sdk-v2'; export interface AccountMenuLink { /** Display label for the link */ label: string; /** URL path for the link */ href: string; /** Optional icon name */ icon?: string; } export interface AccountIconAndMenuProps { /** * Contact/Customer that this component will operate with. * When present, shows account navigation. When null, shows login form. */ user?: Contact | Customer | null; /** * Icon for the account icon in header. * @default 'default-account-icon' */ icon?: string; /** * Show account dropdown at the bottom of the icon when account icon is clicked. * If false, fires onAccountIconClick() instead. * @default true */ showAccountMenuOnClick?: boolean; /** * Title for the account dropdown menu. * @default 'My account' */ accountMenuTitle?: string; /** * Show login form in dropdown for immediate login when user is not logged in. * @default true */ accountHeaderLoginForm?: boolean; /** * GraphQL client for self-contained login. * When provided (and onLoginSubmit is not), LoginForm handles authentication internally. */ graphqlClient?: GraphQLClient; /** * Title displayed inside the login form. * @default 'Welcome Back' */ loginFormTitle?: string; /** Subtitle displayed inside the login form. */ loginFormSubtitle?: string; /** * Label for the login submit button. * @default 'Log In' */ loginButtonText?: string; /** Translated labels forwarded to the embedded `` shown * in the dropdown when no user is signed in. * See `LoginFormProps.labels` for slugs (email, password, forgotPassword, * registerText, registerLink, noAccount, loggingIn, etc.). */ loginFormLabels?: Record; /** * Show/hide the forgot password link inside the login form. * @default true */ displayForgotPasswordLink?: boolean; /** * Show/hide the register link inside the login form. * @default true */ displayRegisterLink?: boolean; /** * Show/hide the guest checkout link inside the login form. * @default false */ displayGuestCheckoutLink?: boolean; /** Fires when the guest checkout link is clicked. */ onGuestCheckoutClick?: () => void; /** * Error message shown inside the login form. * Used in delegation mode (when onLoginSubmit is provided). */ loginError?: string; /** Callback fired before the login process starts. */ beforeLogin?: () => void; /** * Callback fired after successful self-contained login. * Not called in delegation mode — the parent handles the result there. */ afterLogin?: (user: Contact | Customer, accessToken?: string, refreshToken?: string, expiresAt?: string, anonymousCart?: Cart | null) => void; /** Anonymous cart snapshot — forwarded to the embedded `LoginForm` so its `afterLogin` receives it. */ cart?: Cart | null; /** * Fires when login form is submitted (delegation mode). * Parent should handle actual authentication. */ onLoginSubmit?: (email: string, password: string) => void; /** * Fires when account icon is clicked and showAccountMenuOnClick is false. */ onAccountIconClick?: () => void; /** * Fires when a menu item is clicked. Receives the href. */ onMenuItemClick?: (href: string) => void; /** * Fires when logout is clicked. */ onLogoutClick?: () => void; /** * Fires when "Forgot Password" link is clicked. */ onForgotPasswordClick?: () => void; /** * Fires when "Register" link is clicked. */ onRegisterClick?: () => void; /** * Whether login is currently in progress (shows loading state on button). * @default false */ loginLoading?: boolean; /** * Account navigation links shown when user is authenticated. * @default [{ label: 'Dashboard', href: '/account' }, ...] */ menuLinks?: AccountMenuLink[]; /** * Labels for the menu UI. * Available keys: accountLabel, loginTitle, loginSubtitle, loginButton, * signedInAs, logoutLabel, accountMenuTitle. * To translate the embedded LoginForm, use `loginFormLabels` instead. */ labels?: Record; /** Additional class name for the account icon button. */ iconClassName?: string; /** Additional class name for the dropdown menu. */ menuClassName?: string; /** * Component variant. * - 'dropdown' (default): Header icon with popup menu * - 'sidebar': Always-visible vertical navigation for account layout */ variant?: "dropdown" | "sidebar"; /** * Current route path, used in sidebar variant to highlight the active link. */ currentPath?: string; loginFormComponent?: Component; } declare const _default: import('vue').DefineComponent & Readonly<{}>, { showAccountMenuOnClick: boolean; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>; export default _default;