{
  "version": "2.6",
  "children": [
    {
      "type": "frame",
      "id": "CommissionSetupScreen",
      "name": "Screen/CommissionSetup",
      "reusable": true,
      "width": 480,
      "height": 640,
      "fill": "$bg-page",
      "cornerRadius": 20,
      "layout": "vertical",
      "children": [
        {
          "type": "frame",
          "id": "CommHeader",
          "width": "fill_container",
          "fill": "$bg-elevated",
          "padding": [16, 20],
          "gap": 12,
          "alignItems": "center",
          "children": [
            {"type": "frame", "id": "CommIconBg", "width": 44, "height": 44, "fill": "#22C55E15", "cornerRadius": 12, "justifyContent": "center", "alignItems": "center", "children": [
              {"type": "icon_font", "id": "CommIcon", "width": 22, "height": 22, "iconFontName": "percent", "iconFontFamily": "lucide", "fill": "#22C55E"}
            ]},
            {"type": "frame", "id": "CommTitleBox", "width": "fill_container", "layout": "vertical", "gap": 2, "children": [
              {"type": "text", "id": "CommTitle", "fill": "$text-primary", "content": "Cấu Hình Hoa Hồng", "fontFamily": "Roboto", "fontSize": 18, "fontWeight": "700"},
              {"type": "text", "id": "CommSubtitle", "fill": "$text-tertiary", "content": "Thiết lập tỷ lệ hoa hồng", "fontFamily": "Roboto", "fontSize": 13}
            ]},
            {"type": "frame", "id": "CommClose", "width": 36, "height": 36, "fill": "$bg-interactive", "cornerRadius": 10, "justifyContent": "center", "alignItems": "center", "children": [
              {"type": "icon_font", "id": "CommCloseIcon", "width": 18, "height": 18, "iconFontName": "x", "iconFontFamily": "lucide", "fill": "$text-secondary"}
            ]}
          ]
        },
        {
          "type": "frame",
          "id": "CommContent",
          "width": "fill_container",
          "height": "fill_container",
          "layout": "vertical",
          "padding": [16, 20],
          "gap": 14,
          "children": [
            {"type": "frame", "id": "RuleSection", "width": "fill_container", "layout": "vertical", "gap": 10, "children": [
              {"type": "text", "id": "RuleTitle", "fill": "$text-secondary", "content": "Quy tắc hoa hồng", "fontFamily": "Roboto", "fontSize": 13, "fontWeight": "600"},
              {"type": "frame", "id": "Rule1", "width": "fill_container", "fill": "$bg-elevated", "cornerRadius": 12, "padding": 14, "gap": 12, "alignItems": "center", "children": [
                {"type": "frame", "id": "Rule1Icon", "width": 40, "height": 40, "fill": "#3B82F620", "cornerRadius": 10, "justifyContent": "center", "alignItems": "center", "children": [
                  {"type": "icon_font", "id": "Rule1IconI", "width": 20, "height": 20, "iconFontName": "coffee", "iconFontFamily": "lucide", "fill": "#3B82F6"}
                ]},
                {"type": "frame", "id": "Rule1Info", "width": "fill_container", "layout": "vertical", "gap": 2, "children": [
                  {"type": "text", "id": "Rule1Name", "fill": "$text-primary", "content": "Đồ uống", "fontFamily": "Roboto", "fontSize": 14, "fontWeight": "600"},
                  {"type": "text", "id": "Rule1Desc", "fill": "$text-tertiary", "content": "Hoa hồng theo doanh số", "fontFamily": "Roboto", "fontSize": 12}
                ]},
                {"type": "frame", "id": "Rule1Value", "fill": "#22C55E20", "cornerRadius": 8, "padding": [8, 12], "children": [
                  {"type": "text", "id": "Rule1Percent", "fill": "#22C55E", "content": "3%", "fontFamily": "Roboto", "fontSize": 15, "fontWeight": "700"}
                ]}
              ]},
              {"type": "frame", "id": "Rule2", "width": "fill_container", "fill": "$bg-elevated", "cornerRadius": 12, "padding": 14, "gap": 12, "alignItems": "center", "children": [
                {"type": "frame", "id": "Rule2Icon", "width": 40, "height": 40, "fill": "#F9731620", "cornerRadius": 10, "justifyContent": "center", "alignItems": "center", "children": [
                  {"type": "icon_font", "id": "Rule2IconI", "width": 20, "height": 20, "iconFontName": "utensils", "iconFontFamily": "lucide", "fill": "#F97316"}
                ]},
                {"type": "frame", "id": "Rule2Info", "width": "fill_container", "layout": "vertical", "gap": 2, "children": [
                  {"type": "text", "id": "Rule2Name", "fill": "$text-primary", "content": "Đồ ăn", "fontFamily": "Roboto", "fontSize": 14, "fontWeight": "600"},
                  {"type": "text", "id": "Rule2Desc", "fill": "$text-tertiary", "content": "Hoa hồng theo doanh số", "fontFamily": "Roboto", "fontSize": 12}
                ]},
                {"type": "frame", "id": "Rule2Value", "fill": "#22C55E20", "cornerRadius": 8, "padding": [8, 12], "children": [
                  {"type": "text", "id": "Rule2Percent", "fill": "#22C55E", "content": "2%", "fontFamily": "Roboto", "fontSize": 15, "fontWeight": "700"}
                ]}
              ]},
              {"type": "frame", "id": "Rule3", "width": "fill_container", "fill": "$bg-elevated", "cornerRadius": 12, "padding": 14, "gap": 12, "alignItems": "center", "children": [
                {"type": "frame", "id": "Rule3Icon", "width": 40, "height": 40, "fill": "#EC489920", "cornerRadius": 10, "justifyContent": "center", "alignItems": "center", "children": [
                  {"type": "icon_font", "id": "Rule3IconI", "width": 20, "height": 20, "iconFontName": "target", "iconFontFamily": "lucide", "fill": "#EC4899"}
                ]},
                {"type": "frame", "id": "Rule3Info", "width": "fill_container", "layout": "vertical", "gap": 2, "children": [
                  {"type": "text", "id": "Rule3Name", "fill": "$text-primary", "content": "Bonus đạt target", "fontFamily": "Roboto", "fontSize": 14, "fontWeight": "600"},
                  {"type": "text", "id": "Rule3Desc", "fill": "$text-tertiary", "content": "Thưởng khi đạt doanh số 5M/tháng", "fontFamily": "Roboto", "fontSize": 12}
                ]},
                {"type": "frame", "id": "Rule3Value", "fill": "#EC489920", "cornerRadius": 8, "padding": [8, 12], "children": [
                  {"type": "text", "id": "Rule3Amount", "fill": "#EC4899", "content": "500K", "fontFamily": "Roboto", "fontSize": 15, "fontWeight": "700"}
                ]}
              ]}
            ]},
            {"type": "frame", "id": "AddRuleBtn", "width": "fill_container", "height": 48, "fill": "$bg-elevated", "cornerRadius": 12, "stroke": {"thickness": 2, "fill": "$border-default"}, "gap": 8, "justifyContent": "center", "alignItems": "center", "children": [
              {"type": "icon_font", "id": "AddRuleIcon", "width": 18, "height": 18, "iconFontName": "plus", "iconFontFamily": "lucide", "fill": "$orange-primary"},
              {"type": "text", "id": "AddRuleText", "fill": "$orange-primary", "content": "Thêm quy tắc mới", "fontFamily": "Roboto", "fontSize": 14, "fontWeight": "500"}
            ]},
            {"type": "frame", "id": "PayoutSection", "width": "fill_container", "fill": "#22C55E15", "cornerRadius": 14, "padding": 16, "layout": "vertical", "gap": 12, "children": [
              {"type": "text", "id": "PayoutTitle", "fill": "$text-secondary", "content": "Tổng hoa hồng tháng này", "fontFamily": "Roboto", "fontSize": 13, "fontWeight": "500"},
              {"type": "frame", "id": "PayoutDetails", "width": "fill_container", "gap": 16, "children": [
                {"type": "frame", "id": "PayoutAmount", "layout": "vertical", "gap": 2, "children": [
                  {"type": "text", "id": "PayoutValue", "fill": "#22C55E", "content": "2,450,000đ", "fontFamily": "Roboto", "fontSize": 24, "fontWeight": "700"},
                  {"type": "text", "id": "PayoutLabel", "fill": "$text-tertiary", "content": "Cho 8 nhân viên", "fontFamily": "Roboto", "fontSize": 12}
                ]},
                {"type": "frame", "id": "PayoutBtn", "fill": "#22C55E", "cornerRadius": 10, "padding": [10, 16], "gap": 6, "alignItems": "center", "alignSelf": "center", "children": [
                  {"type": "icon_font", "id": "PayoutBtnIcon", "width": 16, "height": 16, "iconFontName": "banknote", "iconFontFamily": "lucide", "fill": "#FFFFFF"},
                  {"type": "text", "id": "PayoutBtnText", "fill": "#FFFFFF", "content": "Chi trả", "fontFamily": "Roboto", "fontSize": 13, "fontWeight": "600"}
                ]}
              ]}
            ]}
          ]
        },
        {
          "type": "frame",
          "id": "CommFooter",
          "width": "fill_container",
          "fill": "$bg-elevated",
          "stroke": {"thickness": 1, "fill": "$border-subtle"},
          "gap": 12,
          "padding": [16, 20],
          "children": [
            {"type": "frame", "id": "ResetBtn", "width": "fill_container", "height": 48, "fill": "$bg-interactive", "cornerRadius": 12, "justifyContent": "center", "alignItems": "center", "children": [
              {"type": "text", "id": "ResetText", "fill": "$text-secondary", "content": "Đặt lại", "fontFamily": "Roboto", "fontSize": 14, "fontWeight": "500"}
            ]},
            {"type": "frame", "id": "SaveCommBtn", "width": "fill_container", "height": 48, "fill": {"type": "gradient", "gradientType": "linear", "rotation": 135, "colors": [{"color": "#FF5C00", "position": 0}, {"color": "#FF8A4C", "position": 1}]}, "cornerRadius": 12, "gap": 8, "justifyContent": "center", "alignItems": "center", "children": [
              {"type": "icon_font", "id": "SaveCommIcon", "width": 18, "height": 18, "iconFontName": "save", "iconFontFamily": "lucide", "fill": "#FFFFFF"},
              {"type": "text", "id": "SaveCommText", "fill": "#FFFFFF", "content": "Lưu cấu hình", "fontFamily": "Roboto", "fontSize": 14, "fontWeight": "600"}
            ]}
          ]
        }
      ]
    }
  ],
  "variables": {
    "bg-elevated": {"type": "color", "value": "#1A1A1D"},
    "bg-interactive": {"type": "color", "value": "#2A2A2E"},
    "bg-page": {"type": "color", "value": "#0A0A0B"},
    "border-default": {"type": "color", "value": "#2A2A2E"},
    "border-subtle": {"type": "color", "value": "#1F1F23"},
    "orange-primary": {"type": "color", "value": "#FF5C00"},
    "text-primary": {"type": "color", "value": "#FFFFFF"},
    "text-secondary": {"type": "color", "value": "#ADADB0"},
    "text-tertiary": {"type": "color", "value": "#8B8B90"}
  }
}
