'''
Created on 06-Mar-2024

@author: bthakur
'''
import os 
import random
import inspect
import traceback

import sympy
import numpy as np

from sympy import (symbols, Function, Derivative, diff,
                   simplify, latex,
                   Symbol, Sum, binomial, factorial, UnevaluatedExpr
                   )

from xv.util import list_to_str
from xv.km.util import latex_fraction

from ..helper import BaseHelper
from xv.km.managers import BaseManager
from xv.km.kelements import KProblemTemplate

# _set_theory_manager
# SetTheoryManager
        
class SetTheoryManager(BaseManager):
    '''

    doc_style: xv_doc
    ''' 

    def __new__(cls, *args, **kwargs):
        instance = super(SetTheoryManager, cls).__new__(cls, *args, **kwargs)
        for base_class in SetTheoryManager.__bases__:
            base_class.__init__(instance, *args, **kwargs)
        return instance
    
    def __init__(self, *args, **kwargs):
        self.base_helper = BaseHelper(**kwargs)
        pass


    def _init_problem_types(self, *args, **kwargs):
        self._append_problem_types([
                '_problem_sample',
             ])
        pass

    def _problem_sample(self, *args, **kwargs):
        """

        doc_style: xv_doc
        """
        
        problemTemplate = KProblemTemplate()
        problemTemplate.problem_type = kwargs.get('problem_type')
        
        
        problem_s = f"""
        """
        problemTemplate.add_problem(problem_s, 'text/html')


        soln_s = f"""
                
        """

        
        problemTemplate.add_solution(soln_s.strip(), 'text/html')

        answer_s = f"""
        
        """

        problemTemplate.add_answer(answer_s.strip(), 'text/html')
        
        
        return problemTemplate
        pass


    pass