# isort: skip_file
from .button import Button  # noqa: F401
from .style import Style  # noqa: F401 F403
from .misc import *  # noqa: F401 F403
from .alert import Warning, Info, Error, Success  # noqa: F401 F403
from .checkbox import Checkbox  # noqa: F401 F403
from .cross_filter import (  # noqa: F401
    CrossFilterDataFrame,
    CrossFilterReport,
    CrossFilterSelect,
    CrossFilterSlider,
)
from .datatable import DataTable, DataFrame  # noqa: F401 F403
from .details import Details  # noqa: F401 F403
from .file_browser import FileBrowser  # noqa: F401 F403
from .image import Image  # noqa: F401 F403
from .markdown import Markdown, MarkdownIt  # noqa: F401 F403
from .slider import (  # noqa: F401 F403
    DateSlider,  # noqa: F401 F403
    FloatSlider,  # noqa: F401 F403
    IntSlider,  # noqa: F401 F403
    ValueSlider,  # noqa: F401 F403
    SliderDate,  # noqa: F401 F403
    SliderFloat,  # noqa: F401 F403
    SliderInt,  # noqa: F401 F403
    SliderValue,  # noqa: F401 F403
    SliderRangeInt,  # noqa: F401 F403
    SliderRangeFloat,  # noqa: F401 F403
)  # noqa: F401 F403
from .sql_code import SqlCode  # noqa: F401 F403
from .togglebuttons import (  # noqa: F401 F403
    ToggleButtonsMultiple,
    ToggleButtonsSingle,
)
from .input import InputText, InputFloat, InputInt  # noqa: F401 F403
from .input_text_area import InputTextArea  # noqa: F401 F403
from .pivot_table import PivotTableView, PivotTable, PivotTableCard  # noqa: F401 F403
from .head import Head  # noqa: F401 F403
from .title import Title  # noqa: F401 F403
from .link import Link  # noqa: F401 F403
from .applayout import AppLayout, Sidebar, AppBar, AppBarTitle  # noqa: F401 F403
from .tab_navigation import TabNavigation  # noqa: F401 F403
from .markdown_editor import MarkdownEditor  # noqa: F401 F403
from .select import Select, SelectMultiple  # noqa: F401 F403
from .matplotlib import FigureMatplotlib  # noqa: F401 F403
from .echarts import FigureEcharts  # noqa: F401 F403
from .figure_altair import FigureAltair, AltairChart  # noqa: F401 F403
from .meta import Meta  # noqa: F401 F403
from .columns import Columns, ColumnsResponsive  # noqa: F401 F403
from .file_drop import FileDrop, FileDropMultiple  # noqa: F401 F403
from .file_download import FileDownload  # noqa: F401 F403
from .tooltip import Tooltip  # noqa: F401 F403
from .card import Card, CardActions  # noqa: F401 F403
from .spinner import SpinnerSolara  # noqa: F401 F403
from .switch import Switch  # noqa: F401 F403
from .progress import ProgressLinear  # noqa: F401 F403
from .component_vue import _component_vue, component_vue  # noqa: F401 F403
import reacton.core

try:
    from reacton import Fragment as Fragment  # type: ignore
except ImportError:
    pass

import logging
from ..settings import main

_container = None

if main.default_container in globals():
    _container = globals()[main.default_container]
else:
    logger = logging.getLogger("solara.components")
    logger.warning(f"Default container {main.default_container} not found in solara.components. Defaulting to Column.")

# TODO: When Solara 2.0 releases Column should be replaced with Fragment
reacton.core._default_container = _container or Column  # noqa: F405
