{
  "format": "pricekit-template",
  "schemaVersion": "1.0",
  "engineVersion": "1",
  "createdWithVersion": "1.0.0",
  "template": {
    "templateId": "6f903ff7-1bf0-41bf-a97f-5a83dee6a541",
    "templateVersion": "1.0"
  },
  "calculator": {
    "name": "إدارة حسابات التواصل الاجتماعي",
    "description": "السعر الشهري لإدارة حساباتك: المنصات وعدد المنشورات والإعلانات الممولة.",
    "currency": "USD",
    "calculatorVersion": 1,
    "moneyDecimals": 2,
    "allowNegativeTotal": false,
    "fields": [
      {
        "key": "platforms",
        "label": "المنصات",
        "type": "multipleChoice",
        "required": true,
        "options": [
          {
            "key": "option_1",
            "label": "فيسبوك"
          },
          {
            "key": "option_2",
            "label": "إنستغرام"
          },
          {
            "key": "option_3",
            "label": "تيك توك"
          },
          {
            "key": "option_4",
            "label": "لينكدإن"
          },
          {
            "key": "option_5",
            "label": "إكس (تويتر)"
          }
        ],
        "visibleByDefault": true,
        "enabledByDefault": true,
        "customerVisible": true
      },
      {
        "key": "posts",
        "label": "عدد المنشورات شهريًا",
        "type": "singleChoice",
        "required": true,
        "options": [
          {
            "key": "option_1",
            "label": "8 منشورات"
          },
          {
            "key": "option_2",
            "label": "12 منشورًا"
          },
          {
            "key": "option_3",
            "label": "20 منشورًا"
          },
          {
            "key": "option_4",
            "label": "30 منشورًا"
          }
        ],
        "visibleByDefault": true,
        "enabledByDefault": true,
        "customerVisible": true
      },
      {
        "key": "reels",
        "label": "فيديوهات قصيرة (ريلز) شهريًا",
        "type": "number",
        "required": true,
        "defaultValue": {
          "type": "number",
          "value": 0
        },
        "constraints": {
          "min": 0,
          "max": 30
        },
        "unit": "فيديو",
        "visibleByDefault": true,
        "enabledByDefault": true,
        "customerVisible": true
      },
      {
        "key": "ads",
        "label": "إدارة الحملات الإعلانية الممولة",
        "type": "boolean",
        "required": false,
        "defaultValue": {
          "type": "boolean",
          "value": false
        },
        "visibleByDefault": true,
        "enabledByDefault": true,
        "customerVisible": true
      },
      {
        "key": "ad_budget",
        "label": "الميزانية الإعلانية الشهرية",
        "type": "number",
        "required": true,
        "defaultValue": {
          "type": "number",
          "value": 300
        },
        "constraints": {
          "min": 0,
          "max": 1000000
        },
        "visibleByDefault": false,
        "enabledByDefault": true,
        "customerVisible": true
      },
      {
        "key": "commitment",
        "label": "مدة الالتزام",
        "type": "singleChoice",
        "required": true,
        "options": [
          {
            "key": "option_1",
            "label": "شهر واحد"
          },
          {
            "key": "option_2",
            "label": "3 أشهر"
          },
          {
            "key": "option_3",
            "label": "6 أشهر"
          }
        ],
        "visibleByDefault": true,
        "enabledByDefault": true,
        "customerVisible": true
      }
    ],
    "rules": [
      {
        "key": "show_ad_budget",
        "name": "الميزانية الإعلانية الشهرية",
        "enabled": true,
        "when": {
          "mode": "any",
          "items": [
            {
              "type": "condition",
              "subject": {
                "kind": "field",
                "key": "ads"
              },
              "operator": "equals",
              "operand": {
                "type": "boolean",
                "value": true
              }
            }
          ]
        },
        "then": [
          {
            "action": "showField",
            "target": "ad_budget"
          }
        ]
      },
      {
        "key": "when_extra_price",
        "name": "رسوم إدارة الإعلانات (15% من الميزانية)",
        "enabled": true,
        "when": {
          "mode": "all",
          "items": [
            {
              "type": "condition",
              "subject": {
                "kind": "field",
                "key": "ads"
              },
              "operator": "equals",
              "operand": {
                "type": "boolean",
                "value": true
              }
            }
          ]
        },
        "then": [
          {
            "action": "activateComponent",
            "target": "extra_price"
          }
        ]
      }
    ],
    "components": [
      {
        "key": "platforms_price",
        "label": "المنصات",
        "stage": "base",
        "pricing": {
          "type": "multipleChoice",
          "field": "platforms",
          "options": [
            {
              "option": "option_1",
              "amount": 80
            },
            {
              "option": "option_2",
              "amount": 80
            },
            {
              "option": "option_3",
              "amount": 100
            },
            {
              "option": "option_4",
              "amount": 80
            },
            {
              "option": "option_5",
              "amount": 50
            }
          ]
        },
        "activeByDefault": true,
        "customerVisible": true
      },
      {
        "key": "posts_price",
        "label": "عدد المنشورات شهريًا",
        "stage": "base",
        "pricing": {
          "type": "singleChoice",
          "field": "posts",
          "options": [
            {
              "option": "option_1",
              "amount": 100
            },
            {
              "option": "option_2",
              "amount": 150
            },
            {
              "option": "option_3",
              "amount": 250
            },
            {
              "option": "option_4",
              "amount": 350
            }
          ]
        },
        "activeByDefault": true,
        "customerVisible": true
      },
      {
        "key": "reels_price",
        "label": "فيديوهات قصيرة (ريلز) شهريًا",
        "stage": "base",
        "pricing": {
          "type": "unitRate",
          "quantity": {
            "kind": "field",
            "key": "reels"
          },
          "rate": 40
        },
        "activeByDefault": true,
        "customerVisible": true
      },
      {
        "key": "commitment_percent",
        "label": "مدة الالتزام",
        "stage": "adjustment",
        "pricing": {
          "type": "percentage",
          "direction": "discount",
          "percent": {
            "type": "choice",
            "field": "commitment",
            "options": [
              {
                "option": "option_1",
                "percent": 0
              },
              {
                "option": "option_2",
                "percent": 5
              },
              {
                "option": "option_3",
                "percent": 10
              }
            ]
          },
          "base": {
            "type": "subtotal",
            "subtotal": "baseSubtotal"
          }
        },
        "activeByDefault": true,
        "customerVisible": true
      },
      {
        "key": "extra_price",
        "label": "رسوم إدارة الإعلانات (15% من الميزانية)",
        "stage": "base",
        "pricing": {
          "type": "unitRate",
          "quantity": {
            "kind": "field",
            "key": "ad_budget"
          },
          "rate": 0.15
        },
        "activeByDefault": false,
        "customerVisible": true
      },
      {
        "key": "minimum_order",
        "label": "الحد الأدنى للباقة الشهرية",
        "stage": "adjustment",
        "pricing": {
          "type": "minimumCharge",
          "minimum": 200,
          "basis": "beforeTax"
        },
        "activeByDefault": true,
        "customerVisible": true
      }
    ],
    "derivedValues": [],
    "outputs": []
  }
}