<?php

namespace App\Controller\admin;

use App\Controller\AbstractController;
use App\Model\AppWebsiteConfig;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\View\RenderInterface;
use Psr\Http\Message\ResponseInterface;

#[Controller(prefix: 'admin/website')]
class WebsiteController extends AbstractController
{
    /**
     * @url /admin/website/config
     * @param RenderInterface $render
     * @return ResponseInterface
     */
    #[RequestMapping(path: 'config', methods: 'get')]
    public function config(RenderInterface $render): ResponseInterface
    {
        return $render->render('website/index');
    }

    /**
     * @url /admin/website/config/insert
     * @param RenderInterface $render
     * @return ResponseInterface
     */
    #[RequestMapping(path: 'config/insert', methods: 'get')]
    public function insert(RenderInterface $render): ResponseInterface
    {
        return $render->render('website/insert');
    }

    /**
     * @url /admin/website/config/view
     * @param RenderInterface $render
     * @return ResponseInterface
     */
    #[RequestMapping(path: 'config/view', methods: 'get')]
    public function view(RenderInterface $render): ResponseInterface
    {
        return $render->render('website/view');
    }
}