"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CaptionText = exports.Icon = exports.PinCodeInput = exports.Wrapper = exports.defaultStyling = void 0;
const tslib_1 = require("tslib");
const native_1 = tslib_1.__importDefault(require("styled-components/native"));
const theme_toolkit_1 = require("@platformbuilders/theme-toolkit");
const Icon_1 = tslib_1.__importDefault(require("../Icon"));
const Typography_1 = tslib_1.__importDefault(require("../Typography"));
const lib_1 = tslib_1.__importDefault(require("./lib"));
const hasError = (0, theme_toolkit_1.ifStyle)('error');
const isContrast = (0, theme_toolkit_1.ifStyle)('contrast');
const isCentered = (0, theme_toolkit_1.ifStyle)('centered');
const danger = (0, theme_toolkit_1.getTheme)('danger');
const brandPrimary = (0, theme_toolkit_1.getTheme)('brand.primary.main');
const textColor = (0, theme_toolkit_1.getTheme)('text.dark');
const brandContrast = (0, theme_toolkit_1.getTheme)('brand.primary.contrast');
const mediumSpacing = (0, theme_toolkit_1.getTheme)('spacing.md');
const defaultStyling = (theme) => ({
    cellStyle: {
        borderRadius: 8,
        borderColor: theme ? textColor(theme) : 'black',
        borderWidth: 2,
    },
    cellStyleFocused: {
        borderColor: theme ? brandPrimary(theme) : '#eeeeee',
    },
    textStyle: {
        fontSize: 26,
        color: theme ? textColor(theme) : 'black',
    },
});
exports.defaultStyling = defaultStyling;
exports.Wrapper = native_1.default.View `
  align-items: center;
  flex-direction: row;
`;
exports.PinCodeInput = (0, native_1.default)(lib_1.default) ``;
exports.Icon = (0, native_1.default)(Icon_1.default).attrs((props) => ({
    color: hasError(danger(props), isContrast(brandContrast(props), brandPrimary(props))(props))(props),
})) `
  margin-left: ${mediumSpacing}px;
`;
exports.CaptionText = (0, native_1.default)(Typography_1.default).attrs({
    variant: 'xs',
}) `
  text-align: ${isCentered('center', 'left')};
  opacity: 0.67;
  font-weight: 300;
`;
//# sourceMappingURL=styles.js.map