import React from "react";
import BreadcrumbComBS from "../breadcrumb/BreadcrumbComBS";
import RecentActions from "./RecentActions";
// import { useQuery } from "@tanstack/react-query";
// import { accountDashboard } from "../../services/services";
// import queryKeys from "../../services/queryKeys";
// import MainLoaderBS from "../loaders/MainLoaderBS";


export default function HomeSections(){

    // const {data:dashData, isFetching, isError} = useQuery({
    //     queryKey: queryKeys.dashboard,
    //     queryFn: async () => await accountDashboard()
    // })

    // if(isFetching){
    //     return(
    //         <>
    //             {/* <MainLoaderBS /> */}
    //             <div className="row">
    //                 <div className="col-12">
    //                     <p className='text-success'>Loading...</p>
    //                 </div>
    //             </div>
    //         </>
    //     )
    // }

    // if(isError){
    //     return (
    //         <div className="row">
    //             <div className="col-12">
    //                 <p className='text-danger'>Error occured! Please refresh to continue</p>
    //             </div>
    //         </div>
    //     )
    // }

    return <>
        {/* <div className="row">
            <div className="col-md-12 m-b-30">
                <div className="d-block d-sm-flex flex-nowrap align-items-center">
                    <div className="page-title mb-2 mb-sm-0">
                        <h1>The Practice Name Shows Up Here </h1>
                    </div>
                    <div className="ml-auto d-flex align-items-center">
                        <nav>
                            <ol className="breadcrumb p-0 m-b-0">
                                <li className="breadcrumb-item">
                                    <a href="/dash"><i className="ti ti-home"></i></a>
                                </li>
                                <li className="breadcrumb-item">
                                    Dashboard
                                </li>
                                <li className="breadcrumb-item active text-primary" aria-current="page">Home</li>
                            </ol>
                        </nav>
                    </div>
                </div>
            </div>
        </div> */}
        <BreadcrumbComBS title='Home' paths={['Dashboard', 'Home']} />
        <div className="row">
            <div className="col-sm-6 col-xxl-3">
                <div className="card card-statistics ecommerce-contant overflow-h">
                    <div className="card-body p-0">
                        <div className="d-flex m-b-0 ecommerce-contant-text h-100">
                            <div className="w-100">
                                <div className="row p-3">
                                    <div className="col">
                                        <h3 className="mb-0">0</h3>
                                        <small className="d-block">Last 2 months</small>
                                    </div>
                                    <div className="col text-right">
                                        <h5 className="text-muted mb-0">Contacts</h5>
                                        <strong className="text-danger m-t-5"><i
                                            className="zmdi zmdi-long-arrow-up font-weight-bold"></i> N/A</strong>
                                    </div>
                                </div>
                                <div className="apexchart-wrapper">
                                    <div id="ecommercedemo3" className="chart-fit"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div className="col-sm-6 col-xxl-3">
                <div className="card card-statistics ecommerce-contant overflow-h">
                    <div className="card-body p-0">
                        <div className="d-flex ecommerce-contant-text m-b-0 h-100">
                            <div className="w-100">
                                <div className="row p-3">
                                    <div className="col">
                                        <h3 className="mb-0">0</h3>
                                        <small className="d-block">Past 12 hours</small>
                                    </div>
                                    <div className="col text-right">
                                        <h5 className="text-muted mb-0">Site Traffic</h5>
                                        <strong className="text-primary m-t-5"><i
                                            className="zmdi zmdi-long-arrow-up font-weight-bold"></i> 0.00%</strong>
                                    </div>
                                </div>
                                <div className="apexchart-wrapper">
                                    <div id="ecommercedemo1" className="chart-fit"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div className="col-sm-6 col-xxl-3">
                <div className="card card-statistics ecommerce-contant overflow-h">
                    <div className="card-body p-0">
                        <div className="d-flex m-b-0 ecommerce-contant-text h-100">
                            <div className="w-100">
                                <div className="w-100">
                                    <div className="row p-3">
                                        <div className="col">
                                            <h3 className="mb-0">0</h3>
                                            <small className="d-block">Last 14 days</small>
                                        </div>
                                        <div className="col text-right">
                                            <h5 className="text-muted mb-0">Appointments</h5>
                                            <strong className="text-orange m-t-5"><i
                                                className="zmdi zmdi-long-arrow-up font-weight-bold"></i> 0.00%</strong>
                                        </div>
                                    </div>
                                </div>
                                <div className="apexchart-wrapper">
                                    <div id="ecommercedemo2" className="chart-fit"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div className="col-sm-6 col-xxl-3">
                <div className="card card-statistics ecommerce-contant overflow-h">
                    <div className="card-body p-0">
                        <div className="d-flex m-b-0 ecommerce-contant-text h-100">
                            <div className="w-100">
                                <div className="row p-3">
                                    <div className="col">
                                        <h3 className="mb-0">5,687</h3>
                                        <small className="d-block">Last 3 months</small>
                                    </div>
                                    <div className="col text-right">
                                        <h5 className="text-muted mb-0">Purchases</h5>
                                        <strong className="text-success m-t-5"><i
                                            className="zmdi zmdi-long-arrow-up font-weight-bold"></i> 9.89%</strong>
                                    </div>
                                </div>
                                <div className="apexchart-wrapper">
                                    <div id="ecommercedemo4" className="chart-fit"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div className="row">
            <div className="col-xxl-6 m-b-30">
                <div className="card card-statistics h-100 mb-0">
                    <div className="card-header">
                        <h4 className="card-title">My Products</h4>
                    </div>
                    <div className="card-body pb-0">
                        <div className="row m-b-20">
                            <div className="col-xxs-6 col-xl-4 col-xxl-6 mb-2 mb-xxl-0 ">
                                <div className="d-flex align-items-center extraProductCard">
                                    <div className="icon-container img-icon m-r-20 bg-light-gray rounded">
                                        <i className="fa fa-cart-plus text-primary"></i>
                                    </div>
                                    <div className="report-details">
                                        <p>Activate now</p>
                                        <h4>Professional Website</h4>
                                    </div>
                                </div>
                            </div>

                            <div className="col-xxs-6 col-xl-4 col-xxl-6 mb-2 mb-xxl-0 ">
                                <div className="d-flex align-items-center extraProductCard">
                                    <div className="icon-container img-icon m-r-20 bg-light-gray rounded">
                                        <i className="fa fa-cart-plus text-primary"></i>
                                    </div>
                                    <div className="report-details">
                                        <p>Activate now</p>
                                        <h4>Professional Blog</h4>
                                    </div>
                                </div>
                            </div>

                            <div className="col-xxs-6 col-xl-4 col-xxl-6 mb-2 mb-xxl-0 ">
                                <div className="d-flex align-items-center extraProductCard">
                                    <div className="icon-container img-icon m-r-20 bg-light-gray rounded">
                                        <i className="fa fa-cart-plus text-primary"></i>
                                    </div>
                                    <div className="report-details">
                                        <p>Activate now</p>
                                        <h4>Business Website</h4>
                                    </div>
                                </div>
                            </div>
                            <div className="col-xxs-6 col-xl-4 col-xxl-6 mb-2 mb-xxl-0 ">
                                <div className="d-flex align-items-center extraProductCard">
                                    <div className="icon-container img-icon m-r-20 bg-light-gray rounded">
                                        <i className="fa fa-cart-plus text-primary"></i>
                                    </div>
                                    <div className="report-details">
                                        <p>Activate now</p>
                                        <h4>Business Blog Site</h4>
                                    </div>
                                </div>
                            </div>

                            <div className="col-xxs-6 col-xl-4 col-xxl-6 mb-2 mb-xxl-0 ">
                                <div className="d-flex align-items-center extraProductCard">
                                    <div className="icon-container img-icon m-r-20 bg-light-gray rounded">
                                        <i className="fa fa-cart-plus text-primary"></i>
                                    </div>
                                    <div className="report-details">
                                        <p>Activate now</p>
                                        <h4>OpenEmr </h4>
                                    </div>
                                </div>
                            </div>
                            <div className="col-xxs-6 col-xl-4 col-xxl-6 mb-2 mb-xxl-0 ">
                                <div className="d-flex align-items-center extraProductCard">
                                    <div className="icon-container img-icon m-r-20 bg-light-gray rounded">
                                        <i className="fa fa-cart-plus text-primary"></i>
                                    </div>
                                    <div className="report-details">
                                        <p>Activate now</p>
                                        <h4>Dummy</h4>
                                    </div>
                                </div>
                            </div>


                            {/*<div style={{backgroundColor: 'green'}} className="col-xxs-6 col-md-4 col-xxl-6 mb-2 mb-xxl-0">*/}
                            {/*    <div className="d-flex align-items-center">*/}
                            {/*        <div className="icon-container img-icon m-r-20 bg-light-gray rounded">*/}
                            {/*            <i className="fa fa-dollar text-primary"></i>*/}
                            {/*        </div>*/}
                            {/*        <div className="report-details">*/}
                            {/*            <p>Annual Revenue</p>*/}
                            {/*            <h3>$40,516</h3>*/}
                            {/*        </div>*/}
                            {/*    </div>*/}
                            {/*</div>*/}
                        </div>
                        <div className="apexchart-wrapper">
                            <div id="ecommerce5" className="chart-fit"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div className="col-xxl-6 m-b-30">
                <RecentActions />
            </div>
        </div>
        <div className="row">
            <div className="col-xxl-8 m-b-30">
                <div className="card card-statistics h-100 mb-0">
                    <div className="card-header d-flex align-items-center justify-content-between">
                        <div className="card-heading">
                            <h4 className="card-title">My Product URLs</h4>
                        </div>
                        <div className="dropdown">
                            {/*<a className="btn btn-xs" href="#!">Export <i className="zmdi zmdi-download pl-1"></i> </a>*/}
                        </div>
                    </div>
                    <div className="card-body scrollbar scroll_dark pt-0" style={{maxHeight: '350px'}}>
                        <div className="datatable-wrapper table-responsive">
                            <table id="datatable" className="table table-borderless table-striped">
                                <thead>
                                <tr>
                                    <th style={{width: '30px'}}>#</th>
                                    <th>Description</th>

                                    <th  style={{width: '100px'}}>Status</th>
                                    <th  style={{width: '40px'}}>Action</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>1</td>
                                    <td>Cold Shoulder Bling Dress</td>

                                    <td><span className="badge badge-success-inverse">Active</span></td>
                                    <td><a className="mr-3" href=""><i className="fe fe-edit"></i></a><a
                                        href=""><i className="fe fe-trash-2"></i></a></td>
                                </tr>
                                <tr>
                                    <td>2</td>
                                    <td>PlayStation 4 Pro 1TB Console</td>

                                    <td><span className="badge badge-success-inverse">Active</span></td>
                                    <td><a className="mr-3" href=""><i className="fe fe-edit"></i></a><a
                                        href=""><i className="fe fe-trash-2"></i></a></td>
                                </tr>
                                <tr>
                                    <td>3</td>
                                    <td>Extra Fine Wool Jumpers</td>

                                    <td><span className="badge badge-danger-inverse">Canceled</span></td>
                                    <td><a className="mr-3" href=""><i className="fe fe-edit"></i></a><a
                                        href=""><i className="fe fe-trash-2"></i></a></td>
                                </tr>
                                <tr>
                                    <td>4</td>
                                    <td>Long Sleeve Bow Top</td>

                                    <td><span className="badge badge-success-inverse">Active</span></td>
                                    <td><a className="mr-3" href=""><i className="fe fe-edit"></i></a><a
                                        href=""><i className="fe fe-trash-2"></i></a></td>
                                </tr>
                                <tr>
                                    <td>5</td>
                                    <td>Shine Stripe Long Sleeve Ruffle</td>

                                    <td><span className="badge badge-success-inverse">Active</span></td>
                                    <td><a className="mr-3" href=""><i className="fe fe-edit"></i></a><a
                                        href=""><i className="fe fe-trash-2"></i></a></td>
                                </tr>
                                <tr>
                                    <td>6</td>
                                    <td>Long Sleeve Micro Thermal Shirt</td>

                                    <td><span className="badge badge-info-inverse">info</span></td>
                                    <td><a className="mr-3" href=""><i className="fe fe-edit"></i></a><a
                                        href=""><i className="fe fe-trash-2"></i></a></td>
                                </tr>



                                </tbody>
                                <tfoot>
                                <tr>
                                    <th>#</th>
                                    <th>Name</th>
                                    <th>Price</th>
                                    <th>In stock</th>
                                    <th>Status</th>
                                    <th>Action</th>
                                </tr>
                                </tfoot>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div className="col-xxl-4 m-b-30">
                <div className="card card-statistics h-100 mb-0">
                    <div className="card-header d-flex justify-content-between">
                        <div className="card-heading">
                            <h4 className="card-title">Lifetime sales</h4>
                        </div>
                        <div className="dropdown">
                            <a className="p-2" href="#!" data-toggle="dropdown" aria-haspopup="true"
                               aria-expanded="false">
                                <i className="fe fe-circle"></i>
                            </a>
                            <div className="dropdown-menu custom-dropdown dropdown-menu-right p-4">
                                <h6 className="mb-1">Action</h6>
                                <a className="dropdown-item" href="#!"><i className="fa-fw fa fa-file-o pr-2"></i>View
                                    reports</a>
                                <a className="dropdown-item" href="#!"><i className="fa-fw fa fa-edit pr-2"></i>Edit reports</a>
                                <a className="dropdown-item" href="#!"><i className="fa-fw fa fa-bar-chart-o pr-2"></i>Statistics</a>
                                <h6 className="mb-1 mt-3">Export</h6>
                                <a className="dropdown-item" href="#!"><i className="fa-fw fa fa-file-pdf-o pr-2"></i>Export
                                    to PDF</a>
                                <a className="dropdown-item" href="#!"><i className="fa-fw fa fa-file-excel-o pr-2"></i>Export
                                    to CSV</a>
                            </div>
                        </div>
                    </div>
                    <div className="card-body">
                        <h5>We only started collecting data from February 2019 </h5>
                        <p>Questions about the Net Earnings number? <a
                            className="btn btn-square btn-inverse-success btn-xs ml-1" href="#">Click here</a></p>
                        <div className="row mt-4">
                            <div className="col-lg-8">
                                <div className="morris-wrapper">
                                    <div id="morrisecommerce1" style={{height: '260px'}}></div>
                                </div>
                            </div>
                            <div className="col-lg-4 mt-4">
                                <div className="mb-3">
                                    <h3 className="mb-0">680</h3>
                                    <p className="mb-0 text-info">Total sales</p>
                                </div>
                                <div className="mb-3">
                                    <h3 className="mb-0">800</h3>
                                    <p className="mb-0 text-primary">Open campaign</p>
                                </div>
                                <div className="mb-3">
                                    <h3 className="mb-0">500</h3>
                                    <p className="mb-0">Daily sales</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </>;

}