from dash import html
import dash_mantine_components as dmc
from dash_iconify import DashIconify
def create_chatbot_panel():
return dmc.Drawer(
id="chatbot-drawer",
title="AI Chatbot",
padding="md",
size="40%",
position="right",
zIndex=10000,
opened=False, # Explicitly set to closed for initial load
children=[
html.Div(
[
# Chat history
dmc.Paper(
p="md",
shadow="xs",
style={"height": "calc(100vh - 250px)", "overflowY": "auto"},
children=[
# Chat messages will go here
],
),
# Chat controls
dmc.Group(
justify="flex-end",
mt="sm",
children=[
dmc.Tooltip(
label="Nouveau Chat",
children=[dmc.ActionIcon(DashIconify(icon="material-symbols:add"), variant="outline")],
),
dmc.Tooltip(
label="Relancer",
children=[dmc.ActionIcon(DashIconify(icon="material-symbols:refresh"), variant="outline")],
),
],
),
# Chat input
dmc.Textarea(
placeholder="Envoyer un message...",
autosize=True,
minRows=2,
maxRows=5,
rightSection=dmc.ActionIcon(
DashIconify(icon="material-symbols:send-outline"),
variant="filled",
color="blue",
),
mt="md",
),
]
)
],
)