'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import { usePathname } from 'next/navigation.js';
import { formatAdminURL } from 'payload/shared';
import React from 'react';
import { useAuth } from '../../providers/Auth/index.js';
import { useConfig } from '../../providers/Config/index.js';
import { DefaultAccountIcon } from './Default/index.js';
import { GravatarAccountIcon } from './Gravatar/index.js';
export const Account = ()=>{
    const { config: { admin: { avatar, routes: { account: accountRoute } }, routes: { admin: adminRoute } } } = useConfig();
    const { user } = useAuth();
    const pathname = usePathname();
    const isOnAccountPage = pathname === formatAdminURL({
        adminRoute,
        path: accountRoute
    });
    if (!user?.email || avatar === 'default') {
        return /*#__PURE__*/ _jsxDEV(DefaultAccountIcon, {
            active: isOnAccountPage
        }, void 0, false, {
            fileName: "src/graphics/Account/index.tsx",
            lineNumber: 27,
            columnNumber: 12
        }, this);
    }
    if (avatar === 'gravatar') {
        return /*#__PURE__*/ _jsxDEV(GravatarAccountIcon, {}, void 0, false, {
            fileName: "src/graphics/Account/index.tsx",
            lineNumber: 30,
            columnNumber: 12
        }, this);
    }
};

//# sourceMappingURL=index.js.map