UNPKG

@sendbird/uikit-react-native

Version:

Sendbird UIKit for React Native: A feature-rich and customizable chat UI kit with messaging, channel management, and user authentication.

30 lines (29 loc) 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _uikitUtils = require("@sendbird/uikit-utils"); function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } class ImageCompressionConfig { constructor(_config) { this._config = _config; if (_config.compressionRate > 1) _uikitUtils.Logger.warn('Compression rate must be in the range of 0.0 - 1.0'); } get compressionRate() { return Math.min(Math.max(0, this._config.compressionRate), 1); } get width() { return this._config.width; } get height() { return this._config.height; } } _defineProperty(ImageCompressionConfig, "DEFAULT", { COMPRESSION_RATE: 0.7 }); var _default = exports.default = ImageCompressionConfig; //# sourceMappingURL=ImageCompressionConfig.js.map