"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_native_1 = require("react-native");
const twrnc_1 = require("twrnc");
const tailwind_1 = __importDefault(require("../../lib/tailwind"));
const react_1 = __importDefault(require("react"));
const ButtonAudi = ({ size, variant, title, disabled, fullwidth, onPress }) => {
    twrnc_1.useDeviceContext(tailwind_1.default);
    let styleFullWidth = fullwidth ? " w-full" : " ";
    let styleFontsize = size === "medium" ? " text-base" : " text-xs";
    let styleFontcolor = variant === "primary"
        ? "text-white dark:text-black"
        : "text-black dark:text-white";
    let styleWidth = size === "medium" ? " min-w-144px" : " min-w-108px";
    let styleBackground = variant === "primary"
        ? " bg-black dark:bg-white"
        : " bg-white dark:bg-black";
    let styleBordercolor = disabled
        ? " border-grey-30 dark:border-grey-60"
        : " border-black dark:border-white";
    //disabled change
    if (disabled) {
        styleBackground =
            variant === "primary"
                ? " bg-grey-30 dark:bg-grey-60"
                : " bg-white dark:bg-black";
        styleFontcolor =
            variant === "primary"
                ? "text-white dark:text-black"
                : "text-grey-30 dark:text-grey-60";
    }
    let stylePressable = "px-32px py-16px rounded-none border" +
        styleBordercolor +
        styleWidth +
        styleBackground +
        styleFullWidth;
    let styleText = variant === "primary"
        ? styleFontcolor + styleFontsize
        : styleFontcolor + styleFontsize;
    return (react_1.default.createElement(react_native_1.View, null,
        react_1.default.createElement(react_native_1.TouchableOpacity, { disabled: disabled, style: tailwind_1.default.style(stylePressable + " flex self-start"), onPress: onPress },
            react_1.default.createElement(react_native_1.Text, { style: tailwind_1.default.style(styleText + " self-start ") }, title))));
};
exports.default = ButtonAudi;
//# sourceMappingURL=index.js.map