from __future__ import annotations

import sys
from pathlib import Path

ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT / "src"))

from epione_templates import load_template_data, validate_template_data


def main() -> int:
    errors = validate_template_data(load_template_data())
    if errors:
        for error in errors:
            print(error)
        return 1
    print("Template schema validation passed.")
    return 0


if __name__ == "__main__":
    raise SystemExit(main())
