{
  "schema": "easycatalog-composition-plan/1",
  "threads": [
    {
      "name": "catalog-content",
      "gutter": 12,
      "crossAxis": "stretch",
      "content": [
        {
          "type": "formattingRule",
          "name": "record-subheader-title",
          "asset": "__EC_RECIPE_523x770_TITLE_RECORD_TABLE_SUBHEADERS",
          "horizontalAlignment": "center",
          "onEmpty": "error"
        },
        {
          "type": "table",
          "name": "ordinary-record-subheader-table",
          "asset": "__EC_RECIPE_523x770_TABLE_RECORDS_WITH_SUBHEADERS_GROW",
          "data": {
            "source": "selectionRoot",
            "result": "self",
            "shape": {
              "scope": "records",
              "sort": [
                {
                  "field": "Category1",
                  "missing": "first"
                },
                {
                  "field": "Category2",
                  "missing": "first"
                },
                {
                  "field": "Category3",
                  "missing": "first"
                },
                {
                  "field": "ID",
                  "missing": "first"
                },
                {
                  "field": "AlphaSV"
                }
              ]
            }
          },
          "compositionMode": "place",
          "autoFitVertically": true,
          "minimumHeight": 48,
          "overflow": "continue",
          "table": {
            "mode": "vertical",
            "fields": {
              "include": [
                "Category1",
                "Category2",
                "Category3",
                "ID",
                "AlphaSV",
                "Price"
              ],
              "leading": [
                "Category1",
                "Category2",
                "Category3",
                "ID"
              ],
              "trailing": [
                "Price"
              ],
              "removeEmpty": false,
              "generated": [
                {
                  "name": "PremiumMarker",
                  "position": {
                    "after": "Price"
                  },
                  "text": {
                    "when": {
                      "greaterThan": [
                        {
                          "number": {
                            "field": "Price"
                          }
                        },
                        100
                      ]
                    },
                    "content": "<img>",
                    "fieldOptions": {
                      "css": {
                        "$constant": "premiumMarkerCss"
                      }
                    }
                  }
                }
              ]
            },
            "columns": {
              "default": {
                "width": {
                  "mode": "variable"
                }
              },
              "fields": {
                "PremiumMarker": {
                  "width": {
                    "mode": "fitToContent",
                    "minimum": 19.8425196850394,
                    "maximum": 19.8425196850394
                  }
                }
              },
              "finalize": true
            },
            "subheaders": [
              {
                "field": "Category1",
                "prototypeRow": 0,
                "omitWhenSingle": false
              }
            ],
            "overrides": {
              "Category1": {
                "label": "Category 1"
              },
              "Category2": {
                "label": "Category 2"
              },
              "Category3": {
                "label": "Category 3"
              },
              "ID": {
                "label": "Code"
              },
              "AlphaSV": {
                "label": "Product"
              },
              "Price": {
                "label": "Price",
                "css": {
                  "if": {
                    "condition": {
                      "greaterThan": [
                        {
                          "number": {
                            "field": "Price"
                          }
                        },
                        100
                      ]
                    },
                    "then": {
                      "$constant": "premiumPriceCss"
                    }
                  }
                }
              },
              "PremiumMarker": {
                "label": "Premium"
              }
            }
          },
          "onEmpty": "error"
        }
      ]
    }
  ],
  "constants": {
    "premiumMarkerCss": "img { width: 3mm; height: 3mm; fillcolor: #0000ff; strokecolor: none; strokeweight: 0pt; topleftcorneroption: rounded_corner; toprightcorneroption: rounded_corner; bottomleftcorneroption: rounded_corner; bottomrightcorneroption: rounded_corner; topleftcornerradius: 0.6mm; toprightcornerradius: 0.6mm; bottomleftcornerradius: 0.6mm; bottomrightcornerradius: 0.6mm; }",
    "premiumPriceCss": "topleftdiagonalline: true; toprightdiagonalline: true;"
  }
}
