import { __exports as out } from '../../../../../../../_virtual/index5.mjs';
import './providers/async.mjs';
import './providers/sync.mjs';
import './settings.mjs';
import { __exports as settings } from '../../../../../../../_virtual/settings3.mjs';
import { __exports as async$1 } from '../../../../../../../_virtual/async4.mjs';
import { __exports as sync$1 } from '../../../../../../../_virtual/sync4.mjs';

Object.defineProperty(out, "__esModule", {
  value: true
});
out.statSync = out.stat = out.Settings = void 0;
const async = async$1;
const sync = sync$1;
const settings_1 = settings;
out.Settings = settings_1.default;
function stat(path, optionsOrSettingsOrCallback, callback) {
  if (typeof optionsOrSettingsOrCallback === 'function') {
    async.read(path, getSettings(), optionsOrSettingsOrCallback);
    return;
  }
  async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
}
out.stat = stat;
function statSync(path, optionsOrSettings) {
  const settings = getSettings(optionsOrSettings);
  return sync.read(path, settings);
}
out.statSync = statSync;
function getSettings(settingsOrOptions = {}) {
  if (settingsOrOptions instanceof settings_1.default) {
    return settingsOrOptions;
  }
  return new settings_1.default(settingsOrOptions);
}

export { out as default };
