"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PhoneInput = void 0;
const react_1 = __importDefault(require("react"));
const react_phone_number_input_1 = __importDefault(require("react-phone-number-input"));
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