<?php


    $page_title="Grid to Market beta";
    $section=null;
    include_once "inc2/header.php";
    // require_once "Conn.php";
    require __DIR__ . "/../vendor/autoload.php";


    // $scr = new G2m\Base; // object for determining current date and time
    // $scr->setNowHour();
    // echo "<br><br>now hour is " . $scr->getNowHour() . "<br>";
    // $scr->setNowTimeClass();
    // echo "<br><br>current time class is " . $scr->getNowTimeClass() . "<br>";

    $rpt1 = new G2m\Label_priceComp('spp_rtm', 'spp_dam', 'avgHr', '4wk', 'hb_busavg', 'loc_price');


    // location row
    $fcL1 = new G2m\Label;
    $fcL1->setTypeC('load', 'wz');
    $fcL1->setLocation('syst_total');
    $fcL1->setLocationTbl('loc_mw');
    $fcL1->setLocLabel($fcL1->getLocation());
    $fcL1->setSumCat1('avgHr');

    // forecast summary table
    $sum1 = new G2m\SumTbl_dayFc('load', 'wz', 'syst_total');


 // main story
 // ad
 // forecast
 // price graph
 // second story
 // third story

?>
<section class="homeDash">
        
    <div class="oneReport">
        <p class="wireTabH">Morning Wire</p>
        <h2 class="wireHeadline">Here is a sample headline</h2>
        <p class="wireText">Here is some sample text for Wire reports from Grid to Market. The reports cover important daily market updates.</p>
    </div>
    <!-- end of first wire -->
    
    <hr>
    <!-- begin pricing live report -->
    <div class="oneReport" id="rpt1">
        <p class="indexSectH">markets <span class="blueText">live</span></p>
        <!-- report header object -->
        <div class="reportHeader addMarginTop">
            <?= G2m\Display_Headers::iso_type_comp_typeActual($rpt1); ?>
        </div>
        
        <!-- div for chart -->
        <div class = 'svg-container' id="graph1"></div>
        <!-- display date row -->
        <?= G2m\Display::row_arrows_displayDate($rpt1); ?>
        <div class="ddCal"></div>
        <!-- start location div -->
        <div class="locationDiv">
            <?= G2m\Display_LocSelect::setLocationDiv($rpt1); ?>
        </div>
        <!-- end location div -->
        <!-- start table div -->
        <div class="tableDiv">
            <!-- start dropdown row with button to show table -->
            <div class="dropdownRow">
                <div class="tableSelect">
                    <p class="textByArrow">Table</p>
                    <div class="arrowTouchZone"><img src="../img/arrow_down.svg" alt=""></div>
                </div> 
                <div class="hct"></div>
            </div>
            <!-- end dropdown row -->
            <!-- table content -->
            <div class="tableContent"></div>
        </div>
        <!-- end table div -->
    </div> 
    <!-- end of pricing live report -->

    <hr>
    <!-- BEGIN FORECAST SECTION -->
    <div class="oneReport" id="fc1">
        <p class="indexSectH">forecast <span class="blueText">ercot</span></p>

        <!-- selector row - pick load, wind or solar -->
        <div class="fcSelectorRow">
            <div></div>
            <div class="fcTab fcTabActive">
                <p class="fcTabText">load</p>               
            </div>
            <div class="fcTab">
                <p class="fcTabText">wind</p>
            </div>
            <div class="fcTab">
                <p class="fcTabText">solar</p>
            </div>
            <div></div>
        </div>
        <!-- end of selector row -->
        <!-- div for main chart -->
        <div class = 'svg-containerDay' id="mGr1"></div>
        <div class="dailyTotCaption"></div>
        
        <!-- overall div for forecast table -->
        <div class="fcTbl">
            <?= G2m\Display::fcTbl($sum1); ?>
        </div>
        
        <!-- end overall div for yesterday -->

        <!-- start location dropdown div -->
        <div class="locationDiv">
            <?= G2m\Display_LocSelect::setLocationDiv($fcL1); ?>      
        </div>
        <!-- end location div --> 

    </div>
    <!-- end of forecast report div -->
    <hr>
    <div class="oneReport">
        <p class="spTabH">a message from grid to market</p>
        <h2 class="spHeadline">Should I buy on the day-ahead or real-time market?</h2>
        <p class="spText">With Grid to Market's pricing analytics, busy decision makers can quickly identify trends, risks and opportunities in wholesale energy markets.</p>
    </div>
    <hr>
    
</section>
  

<?php
    include_once "inc2/footer.php";
    include "BarLineAvgPrice.php";
    include "BarLineMw.php";
    include "BarPercentChHr.php";
    include "BarMwhSumDay.php";
?>

<script src="../js/home.js"></script>
<script>

</script>
<?php
    include_once "inc2/end_file.php";
?>