# law_constitution.py

def preamble_text():
    """Return the Preamble of the Indian Constitution."""
    return (
        "WE, THE PEOPLE OF INDIA, having solemnly resolved to constitute India into a SOVEREIGN, "
        "SOCIALIST, SECULAR, DEMOCRATIC REPUBLIC and to secure to all its citizens: JUSTICE, LIBERTY, EQUALITY and FRATERNITY..."
    )

def list_fundamental_rights():
    """Return the 6 fundamental rights guaranteed by the Indian Constitution."""
    return [
        "Right to Equality",
        "Right to Freedom",
        "Right against Exploitation",
        "Right to Freedom of Religion",
        "Cultural and Educational Rights",
        "Right to Constitutional Remedies"
    ]

def list_fundamental_duties():
    """List the 11 fundamental duties of Indian citizens."""
    return [
        "Abide by the Constitution and respect its ideals and institutions",
        "Cherish noble ideals of the freedom struggle",
        "Uphold and protect sovereignty and integrity of India",
        "Defend the country",
        "Promote harmony",
        "Preserve rich heritage of composite culture",
        "Protect natural environment",
        "Develop scientific temper",
        "Safeguard public property",
        "Strive for excellence",
        "Provide education to children"
    ]

def number_of_constitutional_articles():
    """Return the number of Articles and Schedules in the Indian Constitution."""
    return "Currently, there are 470 Articles in 25 Parts and 12 Schedules."

def describe_article_370():
    """Describe Article 370 (Jammu & Kashmir Special Status)."""
    return (
        "Article 370 granted special autonomous status to the state of Jammu & Kashmir. "
        "It was abrogated on 5 August 2019, integrating the region fully with India."
    )

def article_21_explained():
    """Explain Article 21: Right to Life and Personal Liberty."""
    return (
        "Article 21 guarantees the protection of life and personal liberty. "
        "It ensures no person shall be deprived of life or liberty except according to procedure established by law."
    )

def list_important_articles():
    """List some key Articles in the Constitution."""
    return {
        "Article 14": "Equality before law",
        "Article 19": "Freedom of speech and expression",
        "Article 32": "Right to Constitutional Remedies",
        "Article 51A": "Fundamental Duties",
        "Article 368": "Procedure to amend the Constitution"
    }

def indian_penal_code_sections():
    """List some important IPC sections."""
    return {
        "IPC 302": "Punishment for Murder",
        "IPC 376": "Punishment for Rape",
        "IPC 420": "Cheating and dishonestly inducing delivery of property",
        "IPC 144": "Unlawful Assembly restrictions",
        "IPC 498A": "Cruelty against women by husband or relatives"
    }

def crpc_sections():
    """List important CrPC (Criminal Procedure Code) sections."""
    return {
        "CrPC 41": "When police may arrest without warrant",
        "CrPC 125": "Maintenance of wives, children and parents",
        "CrPC 197": "Prosecution of judges and public servants",
    }

def list_types_of_courts():
    """Return the hierarchy of courts in India."""
    return [
        "Supreme Court of India",
        "High Courts",
        "District and Session Courts",
        "Family Courts",
        "Civil Courts",
        "Magistrate Courts"
    ]

def supreme_court_jurisdiction():
    """Explain the powers and jurisdiction of Supreme Court."""
    return (
        "Supreme Court has original, appellate, and advisory jurisdiction. "
        "It is the guardian of the Constitution and final interpreter of law in India."
    )

def high_court_roles():
    """Functions of High Courts."""
    return (
        "High Courts handle civil, criminal, constitutional, and election matters within their states. "
        "They also issue writs under Article 226."
    )

def writs_explained():
    """Explain the 5 types of writs in Indian law."""
    return {
        "Habeas Corpus": "Produce a detained person before court",
        "Mandamus": "Order public authority to do duty",
        "Prohibition": "Stop lower court from exceeding jurisdiction",
        "Certiorari": "Transfer case from lower to higher court",
        "Quo-Warranto": "Challenge illegal occupancy of public post"
    }

def is_india_a_federal_country():
    """Explain India’s federal structure."""
    return (
        "India is quasi-federal with a strong unitary bias. "
        "Power is distributed between Centre and States, but Centre has more powers during emergency."
    )

def emergency_provisions():
    """Types of emergencies in India."""
    return {
        "Article 352": "National Emergency",
        "Article 356": "President's Rule (State Emergency)",
        "Article 360": "Financial Emergency"
    }

def lok_sabha_vs_rajya_sabha():
    """Differences between Lok Sabha and Rajya Sabha."""
    return {
        "Lok Sabha": "Lower house, directly elected, 545 members",
        "Rajya Sabha": "Upper house, indirectly elected, 245 members"
    }

def describe_basic_structure_doctrine():
    """Explain the Basic Structure doctrine."""
    return (
        "A judicial principle where certain fundamental features of the Constitution cannot be altered by amendments. "
        "Established in Kesavananda Bharati case (1973)."
    )

def election_commission_roles():
    """Powers and responsibilities of Election Commission of India."""
    return [
        "Conduct free and fair elections",
        "Prepare electoral rolls",
        "Monitor political parties",
        "Enforce Model Code of Conduct",
        "Declare results"
    ]

def national_law_universities():
    """List top NLUs (National Law Universities) in India."""
    return [
        "NLSIU Bangalore",
        "NALSAR Hyderabad",
        "NLU Delhi",
        "NLU Jodhpur",
        "NUJS Kolkata",
        "GNLU Gandhinagar"
    ]

def clat_exam_info():
    """Common Law Admission Test (CLAT) overview."""
    return (
        "CLAT is the entrance test for UG and PG law admissions into NLUs. "
        "Covers English, Logical Reasoning, Legal Aptitude, Current Affairs, and Quantitative Techniques."
    )

def indian_citizenship_types():
    """List methods to acquire Indian citizenship."""
    return [
        "By Birth",
        "By Descent",
        "By Registration",
        "By Naturalisation",
        "By Incorporation of Territory"
    ]

def describe_rti_act():
    """Right to Information Act, 2005 explained."""
    return (
        "RTI empowers citizens to access information from public authorities, promoting transparency and accountability. "
        "Anyone can file an RTI to seek documents, decisions, or reasons behind govt actions."
    )

def describe_national_commissions():
    """Constitutional bodies for rights and welfare."""
    return {
        "NHRC": "National Human Rights Commission",
        "NCW": "National Commission for Women",
        "NCPCR": "Child Rights Commission",
        "NCBC": "Backward Classes Commission",
        "NCSC": "Scheduled Castes Commission"
    }

def legal_aid_services():
    """Free legal help by Legal Services Authorities."""
    return (
        "Under Legal Services Authorities Act, 1987, free legal aid is provided to poor, women, SC/ST, and victims. "
        "Available via District Legal Services Authorities (DLSA)."
    )

def types_of_laws():
    """Different types of laws in India."""
    return {
        "Criminal Law": "Related to crimes and punishment (IPC, CrPC)",
        "Civil Law": "Personal rights and property disputes",
        "Constitutional Law": "Structure of government and rights",
        "Administrative Law": "Powers of government departments",
        "Corporate Law": "Business and company regulations"
    }

def describe_evidence_act():
    """Indian Evidence Act overview."""
    return (
        "The Indian Evidence Act, 1872 governs admissibility of evidence in Indian courts. "
        "It defines oral, documentary, and digital evidence rules."
    )

def explain_bail_types():
    """Types of bail in Indian law."""
    return {
        "Regular Bail": "After arrest",
        "Anticipatory Bail": "Before arrest (Section 438 CrPC)",
        "Interim Bail": "Temporary bail for short period"
    }

def describe_child_protection_laws():
    """Laws protecting children in India."""
    return [
        "POCSO Act (Protection of Children from Sexual Offences)",
        "Juvenile Justice Act",
        "Right to Education Act",
        "Child Labour (Prohibition and Regulation) Act"
    ]

def list_amendments():
    """Important amendments to the Constitution."""
    return {
        "42nd Amendment (1976)": "Added words Socialist, Secular, Integrity",
        "44th Amendment": "Reduced Emergency power abuse",
        "73rd Amendment": "Panchayati Raj Institutions",
        "86th Amendment": "Right to Education"
    }

def describe_constitution_maker():
    """About Dr. B.R. Ambedkar and the making of Indian Constitution."""
    return (
        "Dr. B.R. Ambedkar, the chief architect of the Indian Constitution, chaired the Drafting Committee. "
        "The Constitution was adopted on 26 November 1949 and enforced on 26 January 1950."
    )

def describe_module():
    """Summarize the law_constitution module."""
    return (
        "This module promotes legal literacy by explaining core concepts of the Indian Constitution, criminal law, civil rights, "
        "courts, landmark Articles, IPC sections, judiciary hierarchy, and legal awareness through 30 powerful functions. "
        "Great for students, citizens, and curious coders of Bharat."
    )