import { __exports as out } from '../../../../../../../_virtual/index4.mjs';
import './providers/async.mjs';
import './providers/stream.mjs';
import './providers/sync.mjs';
import './settings.mjs';
import { __exports as settings } from '../../../../../../../_virtual/settings2.mjs';
import { __exports as async } from '../../../../../../../_virtual/async3.mjs';
import { __exports as stream } from '../../../../../../../_virtual/stream4.mjs';
import { __exports as sync } from '../../../../../../../_virtual/sync3.mjs';

Object.defineProperty(out, "__esModule", {
  value: true
});
out.Settings = out.walkStream = out.walkSync = out.walk = void 0;
const async_1 = async;
const stream_1 = stream;
const sync_1 = sync;
const settings_1 = settings;
out.Settings = settings_1.default;
function walk(directory, optionsOrSettingsOrCallback, callback) {
  if (typeof optionsOrSettingsOrCallback === 'function') {
    new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
    return;
  }
  new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
}
out.walk = walk;
function walkSync(directory, optionsOrSettings) {
  const settings = getSettings(optionsOrSettings);
  const provider = new sync_1.default(directory, settings);
  return provider.read();
}
out.walkSync = walkSync;
function walkStream(directory, optionsOrSettings) {
  const settings = getSettings(optionsOrSettings);
  const provider = new stream_1.default(directory, settings);
  return provider.read();
}
out.walkStream = walkStream;
function getSettings(settingsOrOptions = {}) {
  if (settingsOrOptions instanceof settings_1.default) {
    return settingsOrOptions;
  }
  return new settings_1.default(settingsOrOptions);
}

export { out as default };
