text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.prettify = void 0;
  const types_1 = require("../../types");
  const style_1 = require("../../style");
  const code_1 = require("../../code");
  function prettify(context) {
      const { dataPath, error: { params: { failingKeyword } } } = types_1.getTypedContext(context);
      const [prePath, pathExpr, postPath] = style_1.pathDescription(context, 'value');
      const title = style_1.style.title('The conditional ', context) +
          style_1.style.expr(`if/${failingKeyword}`, context) +
          style_1.style.title(` on ${prePath}`, context) +
          pathExpr +
          style_1.style.title(`${postPath} is not satisfied (showed in separate error)`, context) +
          "\n" +
          style_1.style.title('The ', context) +
          style_1.style.expr('if', context) +
          style_1.style.title(' clause references:', context);
      const codeFrame = code_1.printCode('Ensure the corresponding ' +
          style_1.style.expr(failingKeyword, context) +
          ' clause is satisfied', context.parsedJson, { dataPath: dataPath.dotOnly, markIdentifier: false });
      return { title, codeFrame };
  }
  exports.prettify = prettify;
  