import random

class AdmissionAgent:
    def reply(self):
        return (
            "šŸŽ“ Admission Agent\n"
            "Admission Process (Step by Step):\n"
            "1. First, fill out the online application form.\n"
            "   šŸ‘‰ Here you enter your personal details and academic records.\n"
            "2. Next, upload the required documents.\n"
            "   šŸ“„ For example: 10th/12th marksheet, ID proof, and passport size photo.\n"
            "3. Pay the registration fee.\n"
            "   šŸ’³ Payment can be done online (UPI, Netbanking, Card).\n"
            "4. Once everything is complete, you will receive a confirmation email.\n"
            "   šŸ“§ This email contains your application number and further instructions.\n\n"
            "✨ Tip: Fill in the details carefully, even a small mistake can cause rejection!"
        )


class ExamAgent:
    def reply(self):
        return (
            "šŸ“ Exam Agent\n"
            "Semester exams start from 10 December.\n"
            "Admit card will be available 5 days before the exam."
        )


class FeesAgent:
    def reply(self):
        return (
            "šŸ’° Fees Agent\n"
            "B.Tech First Year Fees:\n"
            "• Tuition Fee : ₹73,000\n"
            "• Hostel Fee  : ₹20000\n"
            "• Registration: ₹5,000"
        )


class ScholarshipAgent:
    def reply(self):
        return (
            "šŸŽ“ Scholarship Agent\n"
            "Available Scholarships:\n"
            "- Merit Scholarship\n"
            "- SC/ST Scholarship\n"
            "- OBC Scholarship"
            
        )


class IntentClassifier:
    def detect(self, text):
        text = text.lower().strip()

        if "admission" in text:
            return "admission"
        elif "exam" in text:
            return "exam"
        elif "fee" in text or "fees" in text:
            return "fees"
        elif "scholarship" in text:
            return "scholarship"
        elif text in ["bye", "exit", "quit"]:
            return "exit"
        elif "help" in text:
            return "help"
        else:
            return "unknown"


class ResponseAgent:
    def respond(self, intent):
        if intent == "admission":
            return AdmissionAgent().reply()
        elif intent == "exam":
            return ExamAgent().reply()
        elif intent == "fees":
            return FeesAgent().reply()
        elif intent == "scholarship":
            return ScholarshipAgent().reply()
        elif intent == "help":
            return (
                "šŸ“Œ I can help with:\n"
                "- Admission\n"
                "- Exam\n"
                "- Fees\n"
                "- Scholarship\n"
                "Type 'bye' to exit."
            )
        elif intent == "exit":
            exit_messages = [
                "šŸ‘‹ Thank you! Have a nice day.",
                "🚪 Session closed. Goodbye!",
                "✨ Bye! Wishing you success.",
                "🌸 Take care, see you soon!"
            ]
            return random.choice(exit_messages)
        else:
            return (
                "šŸ¤– Sorry! I can help only with:\n"
                "- Admission\n"
                "- Exam\n"
                "- Fees\n"
                "- Scholarship\n"
                "Type 'help' to see options."
            )


def main():
    print("=" * 50)
    print("šŸŽ“ UNIVERSITY AI MULTI-AGENT SYSTEM")
    print("=" * 50)

    name = input("\nšŸ‘‹ Hello! What's your name? ")
    print(f"\nWelcome {name}! Ask about Admission, Exam, Fees or Scholarship.")
    print("Type 'help' for options or 'bye' to exit.\n")

    classifier = IntentClassifier()
    response = ResponseAgent()

    while True:
        user = input("You : ")
        intent = classifier.detect(user)

        print("\nBot :")
        print(response.respond(intent))
        print()

        if intent == "exit":
            break


if __name__ == "__main__":
    main()