import os


class Icons:
    _icons = dict(
        abonents='abonents.png',
        access='access.png',
        accounting='accounting.png',
        accounts='accounts.png',
        Actions_document_edit_icon='Actions-document-edit-icon.png',
        Actions_insert_link_icon='Actions-insert-link-icon.png',
        add='add.png',
        admin='admin.png',
        admin_User='admin_User.png',
        admin_UserGroup='admin_UserGroup.png',
        approved='approved.png',
        attach='attach.png',
        attachDisable='attach_Disable.png',
        attatch='attach.png',
        calc='calc.png',
        calculator='calculator.png',
        cancel='cancel.png',
        card='card.png',
        cards='cards.png',
        closeProgram='Windows-Close-Program-icon.png',
        common_ContractorGroup='common_ContractorGroup.png',
        communication='communication.png',
        company='company.png',
        completed='completed.png',
        contracts='contracts.png',
        copy='copy.png',
        copy_icon='copy.png',
        copy_value='copy_value.png',
        copyProduct='copyproduct.png',
        customer='customer.png',
        data='data.png',
        delete_Column='Delete_Column.png',
        delete_icon='Delete-icon.png',
        detail='detail.png',
        development='development.png',
        dictionary='dictionary.png',
        disabled='disabled.png',
        distribution='distribution.png',
        doccats='doccats.png',
        docitem='docitem.png',
        docizv='docizv.png',
        docizvtype='docizvtype.png',
        docliter='docliter.png',
        doctypes='doctypes.png',
        document='Document-icon.png',
        downloads='downloads.png',
        drawing='drawing.png',
        dvd='dvd.png',
        ellipsis='ellipsis.png',
        ellipsis_Disabled='ellipsis_Disabled.png',
        emulateOutMessage='emulateOutMessage.png',
        error='error.png',
        export='export.png',
        exportDB='exportDB.png',
        filter='filter.png',
        folder1='folder1.png',
        font='font.png',
        format='format.png',
        gradient='gpadient.png',
        grouping='grouping.png',
        groupitem='groupitem.png',
        guid='guid.png',
        Help_icon='Help-icon.png',
        hide='hide.png',
        history='history.png',
        iconAdd='Add_Column.png',
        iconConstructor='Start-Menu-icon.png',
        iconControl='ControlReading.png',
        iconDiscard='cancel-icon.png',
        iconEdit='edit.png',
        iconEllipsis='ellipsis.png',
        iconFile='file.png',
        iconFolder='folder.png',
        iconFunctions='function-selection.png',
        iconNew='Actions-insert-link-icon.png',
        iconOpenFolder='openFolder.png',
        iconRefresh='Refresh.png',
        iconSave='Save-icon.png',
        iconStatistic='systemservice_SeqGenerator.png',
        iconStatistiq='global_manager.png',
        iconTreeNode='document_plain_new.png',
        iconUnknown='unknown.png',
        info='info.png',
        informica='informica.ico',
        ini='ini.png',
        insert='insert.png',
        inventory='inventory.png',
        json_gear='json-gear.png',
        jsonGear='json-gear.png',
        lists='lists.png',
        load='load.png',
        login='login.png',
        mailing='mailing.png',
        material='material.png',
        menu='menu.png',
        message='message.png',
        minus='minus.png',
        mtype='mtype.png',
        mvid='mvid.png',
        node='node.png',
        notice='notice.png',
        notready='notReady.png',
        ok='ok.png',
        organization='organization.png',
        password='password.png',
        pdf='file_pdf.png',
        piz_lico='piz_lico.png',
        planing='planing.png',
        png='file_png.png',
        power='power.png',
        product='product.png',
        production='production.png',
        properties='properties.png',
        ready='ready.png',
        recorder='recorder.png',
        ref='ref.png',
        ref_RefRefs='ref_RefRefs.png',
        reports='reports.png',
        request='request.png',
        sales='sales.png',
        save='save.png',
        send='send.png',
        settings='settings.png',
        shadow='shadow.png',
        show_all='show-all.png',
        softStop='softStop.png',
        start='start.png',
        state='state.png',
        status='status.png',
        statusversion='statusversion.png',
        stocks='stocks.png',
        stoped='stoped.png',
        store='store.png',
        structure='structure.png',
        systemservice='systemservice.png',
        tasks='tasks.png',
        template='template.png',
        theme='theme.png',
        tiff='file_tiff.png',
        tools='tools.png',
        type='type.png',
        upload='upload.png',
        ur_entity='ur_entity.png',
        userposion='userposiion.png',
        visible='visible.png',
        Workflow='Workflow.png',
        zapros='zapros.png',
    )

    def __init__(self, *args, **kwargs):
        self.base_path_2_icons = kwargs.get('base_path_2_icons')

    def get(self, name):
        app_dir = f'{self.base_path_2_icons}{os.sep}{self._icons.get(name)}'
        if not os.path.exists(app_dir):
            raise Exception(f'Path: {app_dir} not exists.')
        return self._icons.get(name)
