'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import { getTranslation } from '@payloadcms/translations';
import React from 'react';
import { useTranslation } from '../../../providers/Translation/index.js';
import { Button } from '../../Button/index.js';
const baseClass = 'list-create-new-doc';
export function ListCreateNewButton({ collectionConfig, hasCreatePermission, newDocumentURL }) {
    const { i18n, t } = useTranslation();
    if (!hasCreatePermission) {
        return null;
    }
    return /*#__PURE__*/ _jsxDEV(Button, {
        "aria-label": t('general:createNewLabel', {
            label: getTranslation(collectionConfig?.labels?.singular, i18n)
        }),
        buttonStyle: "pill",
        className: `${baseClass}__create-new-button`,
        el: 'link',
        size: "small",
        to: newDocumentURL,
        children: t('general:createNew')
    }, "create-new-button", false, {
        fileName: "src/elements/ListHeader/TitleActions/ListCreateNewDocButton.tsx",
        lineNumber: 28,
        columnNumber: 5
    }, this);
}

//# sourceMappingURL=ListCreateNewDocButton.js.map