"use strict";

require("core-js/modules/web.dom.iterable");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.StyledBatchPreferences = exports.MainSettingsRow = exports.BatchPreferencesContainer = exports.DateTimeModalContainer = exports.PlanTripButton = exports.SettingsPreview = exports.StyledDateTimePreview = exports.Button = exports.buttonCss = void 0;

var TripFormClasses = _interopRequireWildcard(require("@opentripplanner/trip-form/lib/styled"));

var _tripForm = require("@opentripplanner/trip-form");

var _styledComponents = _interopRequireWildcard(require("styled-components"));

var _dateTimePreview = _interopRequireDefault(require("./date-time-preview"));

var _styled2 = require("./styled");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

const SHADOW = 'inset 0px 0px 5px #c1c1c1';
const activeCss = (0, _styledComponents.css)`
  background: #e5e5e5;
  -webkit-box-shadow: ${SHADOW};
     -moz-box-shadow: ${SHADOW};
          box-shadow: ${SHADOW};
   outline: none;
`;
const buttonCss = (0, _styledComponents.css)`
  height: 45px;
  width: 45px;
  margin: 0px;
  border: 0px;
  border-radius: 5px;
  &:active {
    ${activeCss}
  }
`;
exports.buttonCss = buttonCss;
const Button = _styledComponents.default.button`
  ${buttonCss}
`;
exports.Button = Button;
const StyledDateTimePreview = (0, _styledComponents.default)(_dateTimePreview.default)`
  ${buttonCss}
  background-color: rgb(239, 239, 239);
  cursor: pointer;
  font-size: 12px;
  margin-right: 5px;
  padding: 7px 5px;
  text-align: left;
  white-space: nowrap;
  width: 120px;
  ${props => props.expanded ? activeCss : null}
`;
exports.StyledDateTimePreview = StyledDateTimePreview;
const SettingsPreview = (0, _styledComponents.default)(Button)`
  line-height: 22px;
  margin-right: 5px;
  padding: 10px 0px;
  position: relative;
  ${props => props.expanded ? activeCss : null}
`;
exports.SettingsPreview = SettingsPreview;
const PlanTripButton = (0, _styledComponents.default)(Button)`
  background-color: #F5F5A7;
  margin-left: auto;
  padding: 5px;
  &:active {
    ${activeCss}
    background-color: #ededaf
  }
`;
exports.PlanTripButton = PlanTripButton;
const expandableBoxCss = (0, _styledComponents.css)`
  background-color: rgb(239, 239, 239);
  box-shadow: rgba(0, 0, 0, 0.32) 7px 12px 10px;
  border-radius: 5px 5px 5px 5px;
  left: 10px;
  position: absolute;
  right: 10px;
  z-index: 99999;
`;
const DateTimeModalContainer = _styledComponents.default.div`
  ${expandableBoxCss}
  padding: 10px 20px;
`;
exports.DateTimeModalContainer = DateTimeModalContainer;
const BatchPreferencesContainer = _styledComponents.default.div`
  ${expandableBoxCss}
  padding: 5px 10px;
`;
exports.BatchPreferencesContainer = BatchPreferencesContainer;
const MainSettingsRow = _styledComponents.default.div`
  align-items: top;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  margin-bottom: 5px;
`; // FIXME: This is identical to StyledSettingsSelectorPanel, with a
// couple of items set to display: none (SettingsHeader and ModeSelector)

exports.MainSettingsRow = MainSettingsRow;
const StyledBatchPreferences = (0, _styledComponents.default)(_tripForm.SettingsSelectorPanel)`
  ${_styled2.modeButtonButtonCss}

  ${TripFormClasses.SettingLabel} {
    color: #808080;
    font-size: 14px;
    font-weight: 100;
    letter-spacing: 1px;
    padding-top: 8px;
    text-transform: uppercase;
  }
  ${TripFormClasses.SettingsHeader} {
    display: none;
    color: #333333;
    font-size: 18px;
    margin: 16px 0px;
  }
  ${TripFormClasses.SettingsSection} {
    margin-bottom: 16px;
  }
  ${TripFormClasses.DropdownSelector} {
    select {
      ${_styled2.commonInputCss}
      -webkit-appearance: none;
      border-radius: 3px;
      font-size: 14px;
      height: 34px;
      line-height: 1.42857;
      margin-bottom: 20px;

      &:focus {
        border-color: #66afe9;
        box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
        outline: 0;
      }
    }
    > div:last-child::after {
      box-sizing: border-box;
      color: #000;
      content: "▼";
      font-size: 67%;
      pointer-events: none;
      position: absolute;
      right: 8px;
      top: 10px;
    }
  }

  ${TripFormClasses.ModeSelector} {
    display: none;
    font-weight: 300;
    ${TripFormClasses.ModeButton.Button} {
      box-shadow: none;
      outline: none;
      padding: 3px;
    }
    ${TripFormClasses.ModeButton.Title} {
      font-size: 10px;
      line-height: 12px;
      padding: 4px 0px 0px;

      &.active {
        font-weight: 600;
      }
    }
  }
  ${TripFormClasses.ModeSelector.MainRow} {
    box-sizing: border-box;
    font-size: 170%;
    margin: 0px -10px 18px;
    padding: 0px 5px;
    ${TripFormClasses.ModeButton.Button} {
      height: 54px;
      width: 100%;
      &.active {
        font-weight: 600;
      }
    }
  }
  ${TripFormClasses.ModeSelector.SecondaryRow} {
    margin: 0px -10px 10px;
    ${TripFormClasses.ModeButton.Button} {
      font-size: 130%;
      font-weight: 800;
      height: 46px;
      > svg {
        margin: 0 0.20em;
      }
    }
  }
  ${TripFormClasses.ModeSelector.TertiaryRow} {
    font-size: 80%;
    font-weight: 300;
    margin: 0px -10px 10px;
    text-align: center;
    ${TripFormClasses.ModeButton.Button} {
      height: 36px;
    }
  }
  ${TripFormClasses.SubmodeSelector.Row} {
    font-size: 12px;
    > * {
      padding: 3px 5px 3px 0px;
    }
    > :last-child {
      padding-right: 0px;
    }
    ${TripFormClasses.ModeButton.Button} {
      height: 35px;
    }
    svg,
    img {
      margin-left: 0px;
    }
  }
  ${TripFormClasses.SubmodeSelector} {
    ${TripFormClasses.SettingLabel} {
      margin-bottom: 0;
    }
  }
  ${TripFormClasses.SubmodeSelector.InlineRow} {
    margin: -3px 0px;
    svg,
    img {
      height: 18px;
      max-width: 32px;
    }
  }
`;
exports.StyledBatchPreferences = StyledBatchPreferences;

//# sourceMappingURL=batch-styled.js