"use strict";
'use client';
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = PHXLink;
const tslib_1 = require("tslib");
const link_1 = tslib_1.__importDefault(require("next/link"));
const react_1 = tslib_1.__importDefault(require("react"));
const LoadingProvider_1 = require("../LoadingProvider");
function PHXLink({ href, children, ...rest }) {
    const { setLoading } = (0, LoadingProvider_1.useLoading)();
    const handleClick = () => {
        setLoading(true);
    };
    return (react_1.default.createElement(link_1.default, { href: href, ...rest, onClick: handleClick }, children));
}
//# sourceMappingURL=link.js.map