#
#   Imandra Inc.
#
#   speclogician/presentation/models/domain.py
#

from __future__ import annotations

from pydantic import BaseModel
from typing import Literal

from speclogician.modeling.domain import BaseStatus


class DomainCountsPM(BaseModel):
    # base flags
    base_status: BaseStatus
    base_has_state: bool
    base_has_action: bool

    # predicates
    num_state_preds_total: int = 0
    num_state_preds_valid_logic: int = 0
    num_state_preds_matched: int = 0

    num_action_preds_total: int = 0
    num_action_preds_valid_logic: int = 0
    num_action_preds_matched: int = 0

    num_preds_total: int = 0
    num_preds_valid_logic: int = 0
    num_preds_matched: int = 0

    # transitions
    num_trans_total: int = 0
    num_trans_valid_logic: int = 0
    num_trans_matched: int = 0


class DomainCodePM(BaseModel):
    base: str = ""
    state_preds_iml: str = ""
    action_preds_iml: str = ""
    transitions_iml: str = ""


class DomainModelPM(BaseModel):
    kind: Literal["domain_model"] = "domain_model"
    counts: DomainCountsPM
    code: DomainCodePM