{
  "format": "pricekit-template",
  "schemaVersion": "1.0",
  "engineVersion": "1",
  "createdWithVersion": "1.0.0",
  "template": {
    "templateId": "380d09fe-2251-46fd-a66a-af6567648651",
    "templateVersion": "1.0"
  },
  "calculator": {
    "name": "تصميم منشورات سوشيال ميديا",
    "description": "احسب سعر تصاميم منشوراتك حسب النوع والعدد والإضافات.",
    "currency": "USD",
    "calculatorVersion": 1,
    "moneyDecimals": 2,
    "allowNegativeTotal": false,
    "fields": [
      {
        "key": "post_type",
        "label": "نوع التصميم",
        "type": "singleChoice",
        "required": true,
        "options": [
          {
            "key": "option_1",
            "label": "منشور ثابت"
          },
          {
            "key": "option_2",
            "label": "منشور متعدد الصور (كاروسيل)"
          },
          {
            "key": "option_3",
            "label": "ستوري"
          },
          {
            "key": "option_4",
            "label": "غلاف صفحة"
          }
        ],
        "visibleByDefault": true,
        "enabledByDefault": true,
        "customerVisible": true
      },
      {
        "key": "designs",
        "label": "عدد التصاميم",
        "type": "number",
        "required": true,
        "defaultValue": {
          "type": "number",
          "value": 4
        },
        "constraints": {
          "min": 1,
          "max": 100
        },
        "unit": "تصميم",
        "visibleByDefault": true,
        "enabledByDefault": true,
        "customerVisible": true
      },
      {
        "key": "copywriting",
        "label": "كتابة النص الإعلاني لكل تصميم",
        "type": "boolean",
        "required": false,
        "defaultValue": {
          "type": "boolean",
          "value": false
        },
        "visibleByDefault": true,
        "enabledByDefault": true,
        "customerVisible": true
      },
      {
        "key": "source_files",
        "label": "تسليم الملفات المفتوحة المصدر",
        "type": "boolean",
        "required": false,
        "defaultValue": {
          "type": "boolean",
          "value": false
        },
        "visibleByDefault": true,
        "enabledByDefault": true,
        "customerVisible": true
      },
      {
        "key": "urgent",
        "label": "تسليم مستعجل خلال 24 ساعة",
        "type": "boolean",
        "required": false,
        "defaultValue": {
          "type": "boolean",
          "value": false
        },
        "visibleByDefault": true,
        "enabledByDefault": true,
        "customerVisible": true
      }
    ],
    "rules": [
      {
        "key": "when_post_type_option_1",
        "name": "نوع التصميم: منشور ثابت",
        "enabled": true,
        "when": {
          "mode": "all",
          "items": [
            {
              "type": "condition",
              "subject": {
                "kind": "field",
                "key": "post_type"
              },
              "operator": "equals",
              "operand": {
                "type": "choice",
                "option": "option_1"
              }
            }
          ]
        },
        "then": [
          {
            "action": "activateComponent",
            "target": "post_type_option_1"
          }
        ]
      },
      {
        "key": "when_post_type_option_2",
        "name": "نوع التصميم: منشور متعدد الصور (كاروسيل)",
        "enabled": true,
        "when": {
          "mode": "all",
          "items": [
            {
              "type": "condition",
              "subject": {
                "kind": "field",
                "key": "post_type"
              },
              "operator": "equals",
              "operand": {
                "type": "choice",
                "option": "option_2"
              }
            }
          ]
        },
        "then": [
          {
            "action": "activateComponent",
            "target": "post_type_option_2"
          }
        ]
      },
      {
        "key": "when_post_type_option_3",
        "name": "نوع التصميم: ستوري",
        "enabled": true,
        "when": {
          "mode": "all",
          "items": [
            {
              "type": "condition",
              "subject": {
                "kind": "field",
                "key": "post_type"
              },
              "operator": "equals",
              "operand": {
                "type": "choice",
                "option": "option_3"
              }
            }
          ]
        },
        "then": [
          {
            "action": "activateComponent",
            "target": "post_type_option_3"
          }
        ]
      },
      {
        "key": "when_post_type_option_4",
        "name": "نوع التصميم: غلاف صفحة",
        "enabled": true,
        "when": {
          "mode": "all",
          "items": [
            {
              "type": "condition",
              "subject": {
                "kind": "field",
                "key": "post_type"
              },
              "operator": "equals",
              "operand": {
                "type": "choice",
                "option": "option_4"
              }
            }
          ]
        },
        "then": [
          {
            "action": "activateComponent",
            "target": "post_type_option_4"
          }
        ]
      },
      {
        "key": "when_copywriting",
        "name": "كتابة النص الإعلاني لكل تصميم",
        "enabled": true,
        "when": {
          "mode": "all",
          "items": [
            {
              "type": "condition",
              "subject": {
                "kind": "field",
                "key": "copywriting"
              },
              "operator": "equals",
              "operand": {
                "type": "boolean",
                "value": true
              }
            }
          ]
        },
        "then": [
          {
            "action": "activateComponent",
            "target": "copywriting_price"
          }
        ]
      },
      {
        "key": "when_source_files",
        "name": "تسليم الملفات المفتوحة المصدر",
        "enabled": true,
        "when": {
          "mode": "all",
          "items": [
            {
              "type": "condition",
              "subject": {
                "kind": "field",
                "key": "source_files"
              },
              "operator": "equals",
              "operand": {
                "type": "boolean",
                "value": true
              }
            }
          ]
        },
        "then": [
          {
            "action": "activateComponent",
            "target": "source_files_price"
          }
        ]
      },
      {
        "key": "when_urgent",
        "name": "تسليم مستعجل خلال 24 ساعة",
        "enabled": true,
        "when": {
          "mode": "all",
          "items": [
            {
              "type": "condition",
              "subject": {
                "kind": "field",
                "key": "urgent"
              },
              "operator": "equals",
              "operand": {
                "type": "boolean",
                "value": true
              }
            }
          ]
        },
        "then": [
          {
            "action": "activateComponent",
            "target": "urgent_percent"
          }
        ]
      }
    ],
    "components": [
      {
        "key": "post_type_option_1",
        "label": "نوع التصميم: منشور ثابت",
        "stage": "base",
        "pricing": {
          "type": "unitRate",
          "quantity": {
            "kind": "field",
            "key": "designs"
          },
          "rate": 15
        },
        "activeByDefault": false,
        "customerVisible": true
      },
      {
        "key": "post_type_option_2",
        "label": "نوع التصميم: منشور متعدد الصور (كاروسيل)",
        "stage": "base",
        "pricing": {
          "type": "unitRate",
          "quantity": {
            "kind": "field",
            "key": "designs"
          },
          "rate": 30
        },
        "activeByDefault": false,
        "customerVisible": true
      },
      {
        "key": "post_type_option_3",
        "label": "نوع التصميم: ستوري",
        "stage": "base",
        "pricing": {
          "type": "unitRate",
          "quantity": {
            "kind": "field",
            "key": "designs"
          },
          "rate": 10
        },
        "activeByDefault": false,
        "customerVisible": true
      },
      {
        "key": "post_type_option_4",
        "label": "نوع التصميم: غلاف صفحة",
        "stage": "base",
        "pricing": {
          "type": "unitRate",
          "quantity": {
            "kind": "field",
            "key": "designs"
          },
          "rate": 20
        },
        "activeByDefault": false,
        "customerVisible": true
      },
      {
        "key": "copywriting_price",
        "label": "كتابة النص الإعلاني لكل تصميم",
        "stage": "base",
        "pricing": {
          "type": "unitRate",
          "quantity": {
            "kind": "field",
            "key": "designs"
          },
          "rate": 5
        },
        "activeByDefault": false,
        "customerVisible": true
      },
      {
        "key": "source_files_price",
        "label": "تسليم الملفات المفتوحة المصدر",
        "stage": "base",
        "pricing": {
          "type": "fixedAmount",
          "amount": 15
        },
        "activeByDefault": false,
        "customerVisible": true
      },
      {
        "key": "urgent_percent",
        "label": "تسليم مستعجل خلال 24 ساعة",
        "stage": "adjustment",
        "pricing": {
          "type": "percentage",
          "direction": "surcharge",
          "percent": {
            "type": "fixed",
            "percent": 25
          },
          "base": {
            "type": "subtotal",
            "subtotal": "baseSubtotal"
          }
        },
        "activeByDefault": false,
        "customerVisible": true
      }
    ],
    "derivedValues": [],
    "outputs": []
  }
}