<?php
namespace Claromentis\Pages\Controller;

$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"] = (@$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] ?: array()) + array("_d724fd14" . "3e64874c7" . "c654b0714" . "e6b6f7" => base64_decode("cGFnZXMuY29tcG9uZW50" . "X3JlcG9zaXRvcnk="), "_4b5e91a0a6f7f822ac389" . "ad9a3fb0ee2" => base64_decode("c3VjY2" . "Vzcw=="), "_dae07b67d02bf6c77ea37" . "726185346fa" => base64_decode("dml" . "ld2" . "Fib" . "GU="), "_54b269a12af880b045f6" . "712e6f865462" => base64_decode("c3" . "Rh" . "dH" . "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["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_d724fd143" . "e64874c7c6" . "54b0714e6b" . "6f7"]];
        $component = $_864ec8f1fa467c206b6bb2b9c0f308bf->find($component_id);
        $component->is_live = !$component->is_live;
        $_864ec8f1fa467c206b6bb2b9c0f308bf->store($component);
        return new JsonPrettyResponse(array($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_dae07b67d02bf6c" . "77ea37726185346f" . "a"] => $component->is_live));
    }
    
    
    
    
    
    
    
    public function DeleteComponent(Application $_6eb6fcb92c942851e079f8ec5fb80324, Request $_b791059c94b285cdf1c90ca6f3a8f2a6, $component_id)
    {
        
        
        
        
        $_864ec8f1fa467c206b6bb2b9c0f308bf = $_6eb6fcb92c942851e079f8ec5fb80324[$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_d724fd143e64874c7" . "c654b0714e6b6f7"]];
        $_864ec8f1fa467c206b6bb2b9c0f308bf->delete($component_id);
        return new JsonPrettyResponse(array($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_54b269a12af880b" . "045f6712e6f86546" . "2"] => $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_4b5e91a0a6f7f82" . "2ac389ad9a3fb0ee" . "2"]));
    }
}