// Copyright 2024 The Lynx Authors. All rights reserved.
// Licensed under the Apache License Version 2.0 that can be found in the
// LICENSE file in the root directory of this source tree.
import { noop } from '../../utils.js';
export const isProfiling = /* @__PURE__ */ Boolean(lynx.performance?.isProfileRecording?.());
const noopFlowId = () => 0;
export const profileStart = /* @__PURE__ */ ((() => {
    let p;
    if (!(p = lynx.performance) || typeof p.profileStart !== 'function') {
        return noop;
    }
    return p.profileStart.bind(p);
})());
export const profileEnd = /* @__PURE__ */ ((() => {
    let p;
    if (!(p = lynx.performance) || typeof p.profileEnd !== 'function') {
        return noop;
    }
    return p.profileEnd.bind(p);
})());
export const profileFlowId = /* @__PURE__ */ ((() => {
    let p;
    if (!(p = lynx.performance) || typeof p.profileFlowId !== 'function') {
        return noopFlowId;
    }
    return p.profileFlowId.bind(p);
})());
//# sourceMappingURL=profile.js.map