"use strict";
'use client';
Object.defineProperty(exports, "__esModule", { value: true });
exports.PHXUseDirectLink = void 0;
const navigation_1 = require("next/navigation");
const PHXUseDirectLink = () => {
    const router = (0, navigation_1.useRouter)();
    const directLink = (pushLink, options) => {
        if (pushLink) {
            const method = (options === null || options === void 0 ? void 0 : options.replace) ? 'replace' : 'push';
            router[method](pushLink);
        }
    };
    return directLink;
};
exports.PHXUseDirectLink = PHXUseDirectLink;
//# sourceMappingURL=direct-link.js.map