import { __exports as out } from '../../../../../../../_virtual/index6.mjs';
import './providers/async.mjs';
import './providers/sync.mjs';
import './settings.mjs';
import { __exports as settings } from '../../../../../../../_virtual/settings4.mjs';
import { __exports as async$1 } from '../../../../../../../_virtual/async6.mjs';
import { __exports as sync$1 } from '../../../../../../../_virtual/sync6.mjs';

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

export { out as default };
