import { Edit3, File, FilePlus, Globe, Trash2 } from "react-feather";

export default function PagesOverview() {
    return (
        <div className="bg-neutral-10 shadow-md p-6 rounded-lg h-full w-full">
            <div className="flex justify-between items-center">
                <p className="font-bold text-xl flex items-center"><Globe className="stroke-primary-main mr-2" />Page Activities</p>
                <div>
                    <div className="btn btn-link text-success-main p-0 mr-8"><File size={20} />Manage pages</div>
                    <div className="btn btn-link text-primary-main p-0"><FilePlus size={20} />Add new page</div>
                </div>
            </div>
            
            <div className="divider text-secondary-main font-semibold">Latest Added Pages</div>
            <div className="w-full px-6">
                <table className="table">
                    <thead>
                        <tr>
                            <th className="w-auto">Title</th>
                            <th className="w-1/3">Category</th>
                            <th className="w-[10px]"></th>
                            <th className="w-[10px]"></th>
                        </tr>
                    </thead>
                    
                    <tbody>
                        <tr className="hover:cursor-pointer hover:bg-secondary-background active:bg-primary-main active:text-white">
                            <td>Page Title</td>
                            <td>Subject Category</td>
                            <td><Edit3 className="stroke-warning-main active:stroke-neutral-10" size={20} /></td>
                            <td><Trash2 className="stroke-error-main active:stroke-neutral-10" size={20} /></td>
                        </tr>
                        <tr className="hover:cursor-pointer hover:bg-secondary-background active:bg-primary-main active:text-white">
                            <td>Page Title</td>
                            <td>Subject Category</td>
                            <td><Edit3 className="stroke-warning-main active:stroke-neutral-10" size={20} /></td>
                            <td><Trash2 className="stroke-error-main active:stroke-neutral-10" size={20} /></td>
                        </tr>
                        <tr className="hover:cursor-pointer hover:bg-secondary-background active:bg-primary-main active:text-white">
                            <td>Page Title</td>
                            <td>Subject Category</td>
                            <td><Edit3 className="stroke-warning-main active:stroke-neutral-10" size={20} /></td>
                            <td><Trash2 className="stroke-error-main active:stroke-neutral-10" size={20} /></td>
                        </tr>
                    </tbody>
                </table>
            </div>
            
            <div className="divider text-secondary-main font-semibold">Latest Modified Pages</div>
            <div className="w-full px-6">
                <table className="table">
                    <thead>
                        <tr>
                            <th className="w-auto">Title</th>
                            <th className="w-1/3">Category</th>
                            <th className="w-[10px]"></th> {/* Edit icon */}
                            <th className="w-[10px]"></th> {/* Delete icon */}
                        </tr>
                    </thead>
                    
                    <tbody>
                        <tr className="hover:cursor-pointer hover:bg-secondary-background active:bg-primary-main active:text-white">
                            <td>Page Title</td>
                            <td>Subject Category</td>
                            <td><Edit3 className="stroke-warning-main active:stroke-neutral-10" size={20} /></td>
                            <td><Trash2 className="stroke-error-main active:stroke-neutral-10" size={20} /></td>
                        </tr>
                        <tr className="hover:cursor-pointer hover:bg-secondary-background active:bg-primary-main active:text-white">
                            <td>Page Title</td>
                            <td>Subject Category</td>
                            <td><Edit3 className="stroke-warning-main active:stroke-neutral-10" size={20} /></td>
                            <td><Trash2 className="stroke-error-main active:stroke-neutral-10" size={20} /></td>
                        </tr>
                        <tr className="hover:cursor-pointer hover:bg-secondary-background active:bg-primary-main active:text-white">
                            <td>Page Title</td>
                            <td>Subject Category</td>
                            <td><Edit3 className="stroke-warning-main active:stroke-neutral-10" size={20} /></td>
                            <td><Trash2 className="stroke-error-main active:stroke-neutral-10" size={20} /></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    )
}