"use strict";
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 __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PhoneInput = exports.isValidPhoneNumber = void 0;
const react_1 = __importDefault(require("react"));
const react_phone_number_input_1 = __importStar(require("react-phone-number-input"));
Object.defineProperty(exports, "isValidPhoneNumber", { enumerable: true, get: function () { return react_phone_number_input_1.isValidPhoneNumber; } });
const styles_1 = require("../../styles");
const styles_2 = require("../BaseInput/styles");
const StyledPhoneInput = styles_1.styled(react_phone_number_input_1.default) `
  position: relative;
  border: 1px solid ${({ theme }) => theme.colors.placeholder};
  border-radius: ${({ theme }) => theme.radii[1]};

  .PhoneInputCountryIcon {
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    z-index: 1;
    pointer-events: none;

    img,
    svg {
      margin: 7px 0 0 7px;
      width: 24px;
      height: 24px;
    }

    &:after {
      content: '';
      position: absolute;
      top: 17px;
      right: -17px;
      width: 0;
      height: 0;
      border-style: solid;
      border-width: 5px 5px 0 5px;
      border-color: #8c9ba5 transparent transparent transparent;
    }
  }

  .PhoneInputCountrySelect {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 38px;
    opacity: 0;
    cursor: pointer;
  }

  .PhoneInputInput {
    ${styles_2.BaseInputStyle}
    height: 38px;
    width: calc(100% - 55px);
    margin-left: 55px;
    padding-left: 8px;
    color: ${({ theme }) => theme.colors.gray[1]};

    &:focus {
      border-color: ${({ theme }) => theme.colors.brandMain};
    }
  }
`;
exports.PhoneInput = (props) => {
    return react_1.default.createElement(StyledPhoneInput, Object.assign({}, props));
};
//# sourceMappingURL=PhoneInput.js.map