"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextNative = void 0;
var react_1 = __importStar(require("react"));
var AppContext_1 = __importDefault(require("../AppProvider/AppContext"));
var RFValue_1 = require("../RFValue");
var TextNative_style_1 = require("./TextNative.style");
exports.TextNative = function (_a) {
    var _b = _a.color, color = _b === void 0 ? '#333' : _b, _c = _a.bold, bold = _c === void 0 ? false : _c, _d = _a.extraBold, extraBold = _d === void 0 ? false : _d, fontWeight = _a.fontWeight, _e = _a.size, size = _e === void 0 ? 15.5 : _e, testID = _a.testID, _f = _a.alignSelfCenter, alignSelfCenter = _f === void 0 ? false : _f, _g = _a.alignCenter, alignCenter = _g === void 0 ? false : _g, _h = _a.alignRight, alignRight = _h === void 0 ? false : _h, _j = _a.style, style = _j === void 0 ? {} : _j, children = _a.children, ref = _a.ref, rest = __rest(_a, ["color", "bold", "extraBold", "fontWeight", "size", "testID", "alignSelfCenter", "alignCenter", "alignRight", "style", "children", "ref"]);
    var _k = react_1.useContext(AppContext_1.default).native, _l = _k === void 0 ? {} : _k, _m = _l.fontFamily, fontFamily = _m === void 0 ? '' : _m, _o = _l.fontWeightDefault, fontWeightDefault = _o === void 0 ? 'normal' : _o;
    var fontFamilyStyle = fontFamily ? fontFamily + "-" + (fontWeight !== null && fontWeight !== void 0 ? fontWeight : fontWeightDefault) : null;
    return (react_1.default.createElement(TextNative_style_1.TextStyle, __assign({ ref: ref, colorText: color, fontFamily: fontFamilyStyle, size: RFValue_1.RFValue(size), alignSelfCenter: alignSelfCenter, alignCenter: alignCenter, alignRight: alignRight, style: style, bold: !fontFamilyStyle && bold, testID: testID }, rest), children));
};
//# sourceMappingURL=TextNative.js.map