from core.database import Base
from datetime import datetime
from sqlalchemy import Boolean, Column, DateTime, Integer, String


class Chat_branding(Base):
    __tablename__ = "chat_branding"
    __table_args__ = {"extend_existing": True}

    id = Column(Integer, primary_key=True, index=True, autoincrement=True, nullable=False)
    widget_name = Column(String, nullable=True)
    avatar_url = Column(String, nullable=True)
    avatar_fallback_initials = Column(String, nullable=True)
    agent_avatar_url = Column(String, nullable=True)
    primary_color = Column(String, nullable=True)
    accent_color = Column(String, nullable=True)
    bubble_bg_color = Column(String, nullable=True)
    bubble_text_color = Column(String, nullable=True)
    header_bg_color = Column(String, nullable=True)
    header_text_color = Column(String, nullable=True)
    launcher_style = Column(String, nullable=True)
    launcher_icon = Column(String, nullable=True)
    launcher_icon_url = Column(String, nullable=True)
    launcher_position = Column(String, nullable=True)
    welcome_message = Column(String, nullable=True)
    offline_message = Column(String, nullable=True)
    ai_intro_message = Column(String, nullable=True)
    human_handover_message = Column(String, nullable=True)
    input_placeholder = Column(String, nullable=True)
    show_branding_footer = Column(Boolean, nullable=True)
    footer_text = Column(String, nullable=True)
    enable_sound = Column(Boolean, nullable=True)
    notification_sound = Column(String, nullable=True)
    theme_mode = Column(String, nullable=True)
    rounded = Column(String, nullable=True)
    font_family = Column(String, nullable=True)
    created_at = Column(DateTime(timezone=True), default=datetime.now)
    updated_at = Column(DateTime(timezone=True), default=datetime.now, onupdate=datetime.now)