<?php

namespace App\Controllers;

class Home extends BaseController
{
    public function index(): string
    {

        $siteData =[];
        //http://10.204.5.100:9083/en/wrench/api/v1/blogdata
       // $out  = $this->APIcall('GET','http://10.204.5.100:9083/en/wrench/api/v1/blogdata',[]);
        //$out  = $this->APIcall('GET','http://10.10.10.35:8805/blogdata/sanyaameye',[]); //  https://blogdata.chiefsoft.net/
        $out  = $this->APIcall('GET','https://blogdata.chiefsoft.net/blogdata/sanyaameye',[]); //  https://blogdata.chiefsoft.net/
       //  var_dump($out);
        //exit();
        $siteData['blogdata'] = $out['payload']['blogdata'];
        $siteData['blog_media_url'] = $out['payload']['image_url'];
        $siteData["linkedin_link"] = "https://www.linkedin.com/in/sanyaolu-ameye-468335";
        $siteData["twitter_link"] = "https://x.com/sanyaameye";
        $siteData["facebook_link"] = "#";
        $siteData["phone_number"] = "#";
        $siteData["contact_email"] = "#";
        $siteData["info_email"] = "#";
        $siteData["research_area"] = $this->research_area();
        return view('welcome_message',$siteData);
    }

    private function research_area(){
        return [
            [
                "topic" => "Topic 001",
                "description" => "Anatomical variations of the sphenoid sinus and nearby neurovascular structures seen on computed tomography of black Africans",
                "file" => "https://scholar.google.com/citations?view_op=view_citation&hl=en&user=syYNLncAAAAJ&citation_for_view=syYNLncAAAAJ:d1gkVwhDpl0C",
          ] ,
          [
              "topic" => "Topic 002",
              "description" => "Descrion a short one for thip paper Topic 001",
              "file" => "myfile.pdf",
          ] ,
          [
              "topic" => "Topic 003",
              "description" => "Descrion a short one for thip paper Topic 001",
              "file" => "myfile.pdf",
          ] ,
          [
              "topic" => "Topic 004",
              "description" => "Descrion a short one for thip paper Topic 001",
              "file" => "myfile.pdf",
          ] ,
          [
              "topic" => "Topic 005",
              "description" => "Descrion a short one for thip paper Topic 001",
              "file" => "myfile.pdf",
          ] ,
          [
              "topic" => "Topic 006",
              "description" => "Descrion a short one for thip paper Topic 001",
              "file" => "myfile.pdf",
          ] ,

        ];
    }
}
