"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.android = android;
exports.ios = ios;
exports.native = native;
exports.platform = platform;
exports.select = select;
exports.web = web;
var _reactNative = require("react-native");
/**
 * Returns the provided styles only on web, undefined on native.
 */
function web(styles) {
  if (_reactNative.Platform.OS === 'web') {
    return styles;
  }
  return undefined;
}

/**
 * Returns the provided styles only on native (iOS + Android), undefined on web.
 */
function native(styles) {
  if (_reactNative.Platform.OS !== 'web') {
    return styles;
  }
  return undefined;
}

/**
 * Returns the provided styles only on iOS, undefined elsewhere.
 */
function ios(styles) {
  if (_reactNative.Platform.OS === 'ios') {
    return styles;
  }
  return undefined;
}

/**
 * Returns the provided styles only on Android, undefined elsewhere.
 */
function android(styles) {
  if (_reactNative.Platform.OS === 'android') {
    return styles;
  }
  return undefined;
}

/**
 * Returns platform-specific styles.
 */
function platform(specifics) {
  if (_reactNative.Platform.OS === 'web') {
    return specifics.web;
  }
  if (_reactNative.Platform.OS === 'ios') {
    return specifics.ios ?? specifics.native;
  }
  if (_reactNative.Platform.OS === 'android') {
    return specifics.android ?? specifics.native;
  }
  return specifics.native;
}

/**
 * Select a value based on theme name.
 */
function select(themeName, options) {
  return options[themeName] ?? options['light'] ?? Object.values(options)[0];
}
//# sourceMappingURL=platform.js.map