# Path: src/sii/lib/printing/TemplateElement.py
# class TemplateElement(object):
#     def resources(self):
#     def carta(self) -> str:
#     def oficio(self) -> str:
#     def thermal80mm(self) -> str:


import os.path as path
from .TemplateElement import TemplateElement, Resource
    """
    def __init__(self, emitter_name_long, emitter_name_short,
                       emitter_activity,
                       emitter_hq_addr, emitter_branch_addr, emitter_phone,
                       order_number='', emitter_salesman='', licence_plate='',
                       logo_path=''):
        self._emitter_name_long   = emitter_name_long
        self._emitter_name_short  = emitter_name_short
        self._emitter_activity    = emitter_activity
        self._emitter_hq_addr     = emitter_hq_addr
        self._emitter_branch_addr = emitter_branch_addr
        self._emitter_phone       = emitter_phone

        # carta/oficio specifics
        self._logo_path = logo_path
        if self._logo_path:
            with open(self._logo_path, 'rb') as fh:
                self._logo_data = fh.read()

        # thermal*mm specifics
        self._order_number     = order_number
        self._licence_plate    = licence_plate
        self._emitter_salesman = emitter_salesman

    @property
    def resources(self):
        ress = []

        if self._logo_path:
            _, ext = path.splitext(self._logo_path)

# Path: src/sii/lib/printing/TemplateElement.py
# class TemplateElement(object):
#     def resources(self):
#     def carta(self) -> str:
#     def oficio(self) -> str:
#     def thermal80mm(self) -> str:


# Path: src/sii/lib/printing/SectionEmitter.py
import os.path as path
from .TemplateElement import TemplateElement, Resource

    """
    def __init__(self, emitter_name_long, emitter_name_short,
                       emitter_activity,
                       emitter_hq_addr, emitter_branch_addr, emitter_phone,
                       order_number='', emitter_salesman='', licence_plate='',
                       logo_path=''):
        self._emitter_name_long   = emitter_name_long
        self._emitter_name_short  = emitter_name_short
        self._emitter_activity    = emitter_activity
        self._emitter_hq_addr     = emitter_hq_addr
        self._emitter_branch_addr = emitter_branch_addr
        self._emitter_phone       = emitter_phone

        # carta/oficio specifics
        self._logo_path = logo_path
        if self._logo_path:
            with open(self._logo_path, 'rb') as fh:
                self._logo_data = fh.read()

        # thermal*mm specifics
        self._order_number     = order_number
        self._licence_plate    = licence_plate
        self._emitter_salesman = emitter_salesman

    @property
    def resources(self):
        ress = []

        if self._logo_path:
            _, ext = path.splitext(self._logo_path)

            ress.append(Resource('logo' + ext, self._logo_data))