"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.resolveValueWithBreakpoint = void 0;

var _tools = require("../../theme/tools");

const resolveValueWithBreakpoint = (values, breakpointTheme, currentBreakpoint, property) => {
  if ((0, _tools.hasValidBreakpointFormat)(values, breakpointTheme, property)) {
    // Check the last valid breakpoint value from all values
    // If current breakpoint is `md` and we have `base` then `lg`, then last value will be taken(`base` in this case)
    return (0, _tools.findLastValidBreakpoint)(values, breakpointTheme, currentBreakpoint);
  } else {
    return values;
  }
};

exports.resolveValueWithBreakpoint = resolveValueWithBreakpoint;
//# sourceMappingURL=resolveValueWithBreakpoint.js.map