{# Product definition -#}

from enum import IntEnum, StrEnum

from orchestrator.domain.base import SubscriptionModel
from orchestrator.types import SubscriptionLifecycle

from {{ product_blocks_module }}.{{ root_block.variable }} import
    {{- " "}}{{ root_block.type }}Block
    {{- ", "}}{{- root_block.type }}BlockInactive
    {{- ", "}}{{- root_block.type }}BlockProvisioning

{% include "enums.j2" %}
{% if non_standard_fixed_inputs -%}
from {{ product_types_module }}.fixed_input_types import {{ non_standard_fixed_inputs }}
{% endif -%}

class {{ product }}Inactive(SubscriptionModel, is_base=True):
    {% for fi in fixed_inputs -%}
    {{ fi.name }}: {{ fi.type }}
    {% endfor -%}
    {{ root_block.name }}: {{ root_block.type }}BlockInactive

class {{ product }}Provisioning({{ product }}Inactive, lifecycle=[SubscriptionLifecycle.PROVISIONING]):
    {% for fi in fixed_inputs -%}
    {{ fi.name }}: {{ fi.type }}
    {% endfor -%}
    {{ root_block.name }}: {{ root_block.type }}BlockProvisioning

class {{ product }}({{ product }}Provisioning, lifecycle=[SubscriptionLifecycle.ACTIVE]):
    {% for fi in fixed_inputs -%}
    {{ fi.name }}: {{ fi.type }}
    {% endfor -%}
    {{ root_block.name }}: {{ root_block.type }}Block
