'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import { formatAdminURL } from 'payload/shared';
import React from 'react';
import { LogOutIcon } from '../../icons/LogOut/index.js';
import { useConfig } from '../../providers/Config/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import { Link } from '../Link/index.js';
const baseClass = 'nav';
export const Logout = /**
   * @deprecated
   * This prop is deprecated and will be removed in the next major version.
   * Components now import their own `Link` directly from `next/link`.
   */ ({ tabIndex = 0 })=>{
    const { t } = useTranslation();
    const { config } = useConfig();
    const { admin: { routes: { logout: logoutRoute } }, routes: { admin: adminRoute } } = config;
    return /*#__PURE__*/ _jsxDEV(Link, {
        "aria-label": t('authentication:logOut'),
        className: `${baseClass}__log-out`,
        href: formatAdminURL({
            adminRoute,
            path: logoutRoute
        }),
        prefetch: false,
        tabIndex: tabIndex,
        title: t('authentication:logOut'),
        children: /*#__PURE__*/ _jsxDEV(LogOutIcon, {}, void 0, false, {
            fileName: "src/elements/Logout/index.tsx",
            lineNumber: 43,
            columnNumber: 7
        }, this)
    }, void 0, false, {
        fileName: "src/elements/Logout/index.tsx",
        lineNumber: 32,
        columnNumber: 5
    }, this);
};

//# sourceMappingURL=index.js.map