
    i	                        d dl mZmZmZ d dlmZmZ d dlmZ  e       Z	e	j                  de      d        Ze	j                  d       ed       ed      fded	ed
efd       Ze	j                  d      defd       Zy)    )	APIRouterRequestForm)HTMLResponseRedirectResponse)authenticatez/login)response_classc                       y)Na  
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>TechSaathi Login</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background: #f4f7fb;
            margin: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
        }
        .login-card {
            width: 360px;
            background: white;
            padding: 28px;
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.08);
        }
        h2 {
            margin: 0 0 8px;
            color: #173b67;
        }
        p {
            margin: 0 0 20px;
            color: #64748b;
        }
        input {
            width: 100%;
            padding: 12px 14px;
            margin-bottom: 14px;
            border: 1px solid #dbe2ea;
            border-radius: 10px;
            box-sizing: border-box;
        }
        button {
            width: 100%;
            padding: 12px 14px;
            border: none;
            border-radius: 10px;
            background: #2563eb;
            color: white;
            font-size: 15px;
            cursor: pointer;
        }
        button:hover {
            background: #1d4ed8;
        }
    </style>
</head>
<body>
    <div class="login-card">
        <h2>Admin Login</h2>
        <p>Login to access dashboard and admin panel.</p>
        <form method="post" action="/chatbot/login">
            <input name="username" placeholder="Username" required>
            <input name="password" type="password" placeholder="Password" required>
            <button type="submit">Login</button>
        </form>
    </div>
</body>
</html>
 r       @/home/techsaathi/public_html/it_helpdesk_chatbot/app/api/auth.py
login_pager   	   s    Cr   .requestusernamepasswordc                 l    t        ||      r|| j                  d<   t        dd      S t        dd      S )Nuserz/chatbot/admin.  status_code/chatbot/login)r   sessionr   )r   r   r   s      r   loginr   Q   s6    Hh'"* 0cBB,#>>r   z/logoutc                 P    | j                   j                          t        dd      S )Nr   r   r   )r   clearr   )r   s    r   logoutr   Y   s     OO,#>>r   N)fastapir   r   r   fastapi.responsesr   r   app.core.authr   routergetr   poststrr   r   r   r   r   <module>r$      s    , , < &	 H\2D 3DN X,0ItCy ?7 ?c ? ? ? I?G ? ?r   