import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { forwardRef } from 'react';
import { DownloadVOutlineSm } from '../../icons/DownloadVOutlineSm';
import { OpenLinkOutlineSm } from '../../icons/OpenLinkOutlineSm';
import { StyledLink } from './styles';
export const Link = forwardRef(({ withAdornment, isDownload, downloadFilename, children, ...props }, ref) => {
    const icon = isDownload ? _jsx(DownloadVOutlineSm, {}) : _jsx(OpenLinkOutlineSm, {});
    return (_jsxs(StyledLink, { download: downloadFilename ?? isDownload, ref: ref, ...props, children: [withAdornment === 'start' && icon, children, withAdornment === 'end' && icon, !withAdornment && isDownload && _jsx(DownloadVOutlineSm, {})] }));
});
