/*
 * Copyright 2019 Esri
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
import { tsx } from "esri/widgets/support/widget";
 import HomeSection from "./sections/HomeSection";
 import { FloorsSection, Floor } from "./sections/FloorsSection";
//  import SurroundingsSection from "./sections/SurroundingsSection";
 import Collection from "esri/core/Collection";
 import {Timetable, DayTimetable} from "./widgets/Timetable/Timetable";

export const portalUrl = "https://hftstuttgart.maps.arcgis.com";

//export const websceneId = "39d8c249469144faaec0aef434075788"; 
export const websceneId = "2f5bd708966344f99b7a6c8b6ea833ea";

 export const sections = [
   // Check the different files
   // to adapt to your need
   // or create a new section by
   // implement a subclass from `Section`
   
   // About HFT Stuttgart section
new HomeSection({
  content: (that: any) => (
    <div>
      <p>
        The Hochschule für Technik Stuttgart holds a history of over 190 years and is one of the best universities for applied sciences in Baden-Württemberg.
        The main buildings of HFT campus were established in 1819. The campus has a total of 8 buildings now, including both old and new constructions.
      </p>
      <div>
      <p>
        Developers: Sanghmitra Banerjee, Rushikesh Padsala (Rushi)
      </p>
      </div>
      <div>
      <p>
        Note: The web application is based on a prototype developed by Esri. Check about I3S Building Scene Layer to know more.
      </p>
      </div>
    </div>
  ),
       timetable: new Timetable({
          dates: new Collection([
            new DayTimetable({
              opens: "7:00",
              closes: "23:00"
           }),
           new DayTimetable({
             opens: "7:00",
             closes: "23:00"
           }),
           new DayTimetable({
             opens: "7:00",
             closes: "23:00"
           }),
           new DayTimetable({
             opens: "7:00",
             closes: "23:00"
           }),
           new DayTimetable({
             opens: "7:00",
             closes: "23:00"
           }),
          //  new DayTimetable({
          //    opens: "10:00",
          //    closes: "17:00"
          //  }),
          //  new DayTimetable({
          //    opens: "10:00",
          //    closes: "17:00"
          //  })
         ])
      })
}),

 // Bau 1 of HFT Campus


//    // The different floors for HFT Stuttgart:
    new FloorsSection({
      FloorSurface: new Collection([
        new Floor({
          title: "Building 1",
          subtitle: "Ground Floor",
//          audio: "https://my.christchurchcitylibraries.com/wp-content/uploads/sites/5/2019/01/He-Hononga.mp3",
          floor: 0,
          content: (that: any) => (<div id="connection" bind={that} key={that}><p><span></span></p></div>)
        }),
        new Floor({
          title: "Building 1",
          subtitle: "First Floor",
//          audio: "https://my.christchurchcitylibraries.com/wp-content/uploads/sites/5/2019/01/Hapori.mp3",
          floor: 1,
          content: (that: any) => (<div id="community" bind={that} key={that}><p><span></span></p></div>)
        }),
        new Floor({
          title: "Building 1",
          subtitle: "Second Floor",
//          audio: "https://my.christchurchcitylibraries.com/wp-content/uploads/sites/5/2019/01/Tuakiri.mp3",
          floor: 2,
          content: (that: any) => (<div id="identity" bind={that} key={that}><p><span></span></p></div>)
        }),
        new Floor({
          title: "Building 1",
          subtitle: "Third Floor",
//          audio: "https://my.christchurchcitylibraries.com/wp-content/uploads/sites/5/2019/01/T%C5%ABhuratanga.mp3",
          floor: 3,
          content: (that: any) => (<div id="discovery" bind={that} key={that}><p><span></span></p></div>)
        }),
//        new Floor({
//          title: "Auahatanga",
//          subtitle: "creativity",
//          audio: "https://my.christchurchcitylibraries.com/wp-content/uploads/sites/5/2019/01/Auahatanga.mp3",
//          floor: 4,
//          content: (that: any) => (<div id="creativity" bind={that} key={that}><p><span>Browse the World Languages, Music and Fiction collections, including Biographies and Graphic Novels. Visit the two roof gardens with great views across the city. Explore your creativity in the Production Studio using creative technology such as 3D printers and sewing machines. Create and edit music and video using the Audio/Video Studio, or take a class in the Computer Labs with a great range of software available.</span></p></div>)
//        })
      ])
    }),
     // Surroundings:
    //  new SurroundingsSection({})
 ];

 export const floorMapping = (originalFloor: number) => {
   let floor = originalFloor;
   if (floor > 3) {
     floor += 1;
   }

   return floor;
 }



 //export const extraQuery = " AND Category <> 'WallSurface' AND Category <> 'RoofSurface'  AND Category <> 'GroundSurface'";
// export const extraQuery = " AND (Category <> 'Generic Models' OR OBJECTID_1 = 2) AND Category <> 'Walls' AND Category <> 'Roofs'  AND Category <> 'Curtain Wall Mullions' AND Category <> 'Curtain Panels'";
