<?php
namespace Claromentis\Pages\Controller;

$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"] = (@$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"] ?: array()) + array("_d724fd143e64874c7c65" . "4b0714e6b6f7" => base64_decode("cGFnZXMuY29tcG9uZW50X3JlcG9zaX" . "Rvcnk="), "_dae07b67d0" . "2bf6c77ea37" . "726185346fa" => base64_decode("dmlld2" . "FibGU="), "_4b5e91a0a6f7f" . "822ac389ad9a3f" . "b0ee2" => base64_decode("c3VjY2V" . "zcw=="), "_54b269a12af880b045f6712e6f86" . "5462" => base64_decode("c3R" . "hdH" . "Vz"));
use Claromentis\Core\Application;
use Claromentis\Core\Http\JsonPrettyResponse;
use Claromentis\Pages\Repository\CustomComponentRepository;
use Psr\Http\Message\ServerRequestInterface as Request;




class AdminRestV1
{
    
    
    
    
    
    
    
    public function SetViewable(Application $_6eb6fcb92c942851e079f8ec5fb80324, Request $_b791059c94b285cdf1c90ca6f3a8f2a6, $component_id)
    {
        
        
        
        
        $_864ec8f1fa467c206b6bb2b9c0f308bf = $_6eb6fcb92c942851e079f8ec5fb80324[$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_d724fd143e64874c7c654b0714e6b6f" . "7"]];
        $component = $_864ec8f1fa467c206b6bb2b9c0f308bf->find($component_id);
        $component->is_live = !$component->is_live;
        $_864ec8f1fa467c206b6bb2b9c0f308bf->store($component);
        return new JsonPrettyResponse(array($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_dae07b67d02bf6c77ea37726185" . "346fa"] => $component->is_live));
    }
    
    
    
    
    
    
    
    public function DeleteComponent(Application $_6eb6fcb92c942851e079f8ec5fb80324, Request $_b791059c94b285cdf1c90ca6f3a8f2a6, $component_id)
    {
        
        
        
        
        $_864ec8f1fa467c206b6bb2b9c0f308bf = $_6eb6fcb92c942851e079f8ec5fb80324[$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_d724fd143e6" . "4874c7c654b0" . "714e6b6f7"]];
        $_864ec8f1fa467c206b6bb2b9c0f308bf->delete($component_id);
        return new JsonPrettyResponse(array($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_54b269a12af880b045f6712e6f865" . "462"] => $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_4b5e91a0a6f7f822ac389ad" . "9a3fb0ee2"]));
    }
}