"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.concatMediaParams = concatMediaParams;
exports.isPreviouslyProcessed = isPreviouslyProcessed;

var _typeCheckUtils = require("./typeCheckUtils");

function concatMediaParams(prefix, suffix) {
  return prefix ? `${prefix} and ${suffix}` : `${suffix}`;
}

function isPreviouslyProcessed(rule, {
  hoverMedQuerySuffix,
  activeMedQuerySuffix
}) {
  return (0, _typeCheckUtils.isParentAtRule)(rule) && ((0, _typeCheckUtils.isParentAtRuleContainsParam)(rule, hoverMedQuerySuffix) || (0, _typeCheckUtils.isParentAtRuleContainsParam)(rule, activeMedQuerySuffix));
}