'use strict';

var os = require('node:os');
var chunkedExec = require('./chunked-exec-tHzxUWFk.cjs');
require('node:util');
require('node:child_process');
require('node:url');

var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
const isOlderThanMountainLion = Number(os.release().split('.')[0]) < 12;

// Binary source: https://github.com/sindresorhus/macos-trash
const binary = new URL('macos-trash', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('macos-BYKwI9yg.cjs', document.baseURI).href)));

async function macOS(paths) {
	if (isOlderThanMountainLion) {
		throw new Error('macOS 10.12 or later required');
	}

	await chunkedExec.chunkedExec(binary, paths, 1000);
}

exports.default = macOS;
