"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_runtime = require('../_virtual/_rolldown/runtime.js');
const require_objects_predicates = require('../objects/predicates.js');
const require_effects_pulse_frames = require('../effects/pulse-frames.js');
const require_spinner_spinner = require('./spinner.js');
let src_external__socketregistry_yocto_spinner = require("../external/@socketregistry/yocto-spinner");
src_external__socketregistry_yocto_spinner = require_runtime.__toESM(src_external__socketregistry_yocto_spinner);

//#region src/spinner/default.ts
/**
* @file Spinner-style registry — exposes the union of the standard
*   `cli-spinners` collection and Socket's custom `socket` pulse animation,
*   plus a lazy default-spinner singleton. The registry itself is built once
*   and memoized; `getDefaultSpinner()` defers `Spinner()` construction until
*   first call so module initialization stays cheap.
*/
let _cliSpinners;
let _spinner;
/**
* Get available CLI spinner styles or a specific style by name. Extends the
* standard cli-spinners collection with Socket custom spinners.
*
* Custom spinners: - `socket` (default): Socket pulse animation with sparkles
* and lightning.
*
* @example
*   ;```ts
*   // Get all available spinner styles
*   const allSpinners = getCliSpinners()
*
*   // Get specific style
*   const socketStyle = getCliSpinners('socket')
*   const dotsStyle = getCliSpinners('dots')
*   ```
*
* @param styleName - Optional name of specific spinner style to retrieve.
*
* @returns Specific spinner style if name provided, all styles if omitted,
*   `undefined` if style not found.
*
* @see https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json
*/
/*@__NO_SIDE_EFFECTS__*/
function getCliSpinners(styleName) {
	if (_cliSpinners === void 0)
 /* c8 ignore stop */
	_cliSpinners = {
		__proto__: null,
		...(0, src_external__socketregistry_yocto_spinner.default)({}).constructor.spinners,
		socket: require_effects_pulse_frames.generateSocketSpinnerFrames()
	};
	if (typeof styleName === "string" && _cliSpinners) return /* @__PURE__ */ require_objects_predicates.hasOwn(_cliSpinners, styleName) ? _cliSpinners[styleName] : void 0;
	return _cliSpinners;
}
/**
* Get the default spinner instance. Lazily creates the spinner to avoid
* circular dependencies during module initialization. Reuses the same instance
* across calls.
*
* @example
*   ;```ts
*   import { getDefaultSpinner } from '@socketsecurity/lib/spinner/default'
*
*   const spinner = getDefaultSpinner()
*   spinner.start('Loading…')
*   ```
*
* @returns Shared default spinner instance
*/
function getDefaultSpinner() {
	if (_spinner === void 0) _spinner = /* @__PURE__ */ require_spinner_spinner.Spinner();
	return _spinner;
}

//#endregion
exports.getCliSpinners = getCliSpinners;
exports.getDefaultSpinner = getDefaultSpinner;