<?php
namespace Claromentis\Projects\Controller;

$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"] ?: array()) + array("mess" . "age" => base64_decode("bWVzc2FnZQ" . "=="), "_ec7df3fc85624b2f6a0751638802ec1" . "c" => base64_decode("dG9waWNfbmFtZS5i" . "b2R5"), "_0894e7939c4ffdbee6f82acb5ea5" . "d4d9" => base64_decode("b3duZXJfdGV4dC5" . "ib2R5"), "_71064868e7128" . "0f122abdb22625" . "2d0af" => base64_decode("b3duZXJfdG" . "V4dC52aXNp" . "Ymxl"), "_7aefd482de7885f4293c2926d" . "f28c235" => base64_decode("anNv" . "bl9l" . "bmNv" . "ZGU="), "_759550b8" . "8b27633d1" . "fd141ab28" . "641b86" => base64_decode("cHJvamVjdHMudG9waWMuZWRpdGluZ190b3BpYw" . "=="), "_c91bf2a5cd32" . "64f51259b2251" . "6dd36db" => base64_decode("cHJvamVjdHMvdG9" . "waWMuaHRtbA=="), "_64282ac18" . "2bac83fb33" . "fa75272364" . "87a" => base64_decode("cHJvamVjdHMudG" . "9waWMucHJvamVj" . "dF90b3BpYw=="), "_b4ffb533a3ef65" . "e495b8ebd37889f" . "0fa" => base64_decode("OjpTaG93RWR" . "pdA=="), "_916f617cc73c4715ad36fab58944f48" . "b" => base64_decode("cHJvamVjdHMudG9waWMuZG" . "VsZXRlZA=="), "_89d65ff" . "d4624f64" . "4a8f7670" . "c0886ebd" . "a" => base64_decode("b3duZXJf" . "bGluay5o" . "cmVm"), "_dfd6609684f3720" . "447d838be396f4c4" . "9" => base64_decode("ZGVsZXRlX3RvcGljX2" . "xpbmsudmlzaWJsZQ=="), "_b9e69cfd" . "341b88cba" . "bae108b90" . "96078f" => base64_decode("cHJvamVjdHMudG9waWNz" . "LmNhbnRfZWRpdA=="), "_1cc2e9c9bc51" . "aa1537ad5ba5b" . "9956cd0" => base64_decode("Y2FuY2" . "VsX2J1" . "dHRvbi" . "5ocmVm"), "_2b281c8f6f425f036ca989b" . "728d87b43" => base64_decode("cHJvamVjdHN" . "fYnJlYWRjcn" . "VtYi5jcnVtY" . "nM="), "_14fb76995c1bfa46f30ce5b9e3" . "c66561" => base64_decode("LyMvZGlzY3Vzc2lvblRhY" . "g=="), "_18dff24b6c6fbb" . "8acc19cc641faa2" . "ff2" => base64_decode("cHJvamVjdF9kZXNjLmJ" . "vZHlfaHRtbA=="), "_7a7d52f1da6116b2" . "ba0283bc49ea6169" => base64_decode("cHJvamVjdHM" . "udG9waWNzLm" . "NhbnRfYWRk"), "_c5ae6af0d2" . "8c2ed850bea" . "1bbaccdd015" => base64_decode("Y29tbWVud" . "F9jb3VudC" . "5ib2R5"), "_3c8c6bfa460" . "0e3c445c7aa6" . "77cb39a40" => base64_decode("dG9waWNfYWRtaW5" . "fbWVudS52aXNpYm" . "xl"), "_10291c44" . "0e05c67b7" . "d794a7de6" . "ee906f" => base64_decode("cHJvamVjdHMudG9waWNzLmNhb" . "nRfdmlldw=="), "_533ab5b" . "4c9f0dc0" . "efaf67d5" . "099df811" . "f" => base64_decode("b3duZXJfbGluay52aXNpYmx" . "l"), "_b4f8623d4c09" . "772f99f995e1b" . "339b756" => base64_decode("X2Nvbn" . "Ryb2xs" . "ZXI="), "_e7ab4fbc303524d92fc415318f963d" . "8a" => base64_decode("dG9waWNfZ" . "GlzY3Vzc2" . "lvbi5vYmp" . "lY3RfaWQ="), "_b663a44bd9712b" . "c09564139d4db1c" . "c2a" => base64_decode("Iy9kaXNjdXNz" . "aW9uVGFi"), "is_error_m" . "essage" => base64_decode("aXNfZXJyb3" . "JfbWVzc2Fn" . "ZQ=="), "_0066ffe735b7db5" . "ee2e380918e0541f" . "8" => base64_decode("Y29tbXVuaWNhd" . "Glvbi5pbWVzc2" . "FnZXMuc3lzdGV" . "t"), "_d851e1169309" . "5c2df5aeddaf4" . "afda6ae" => base64_decode("bW9kaWZ" . "pZWQuYm" . "9keQ=="), "_bdc519969" . "02510d5689" . "9e6b150419" . "5a3" => base64_decode("cHJvamVjdHMvZWRpdF90b3BpYy5odG1" . "s"), "_db9a5043d2be38dfba" . "a1d178a4075583" => base64_decode("ZWRpdF90b3BpY19saW5rLm" . "hyZWY="), "_a19440cccfaf8fbd9f5de9eaaba2" . "2059" => base64_decode("cHJvamVjdHMudG9waWMuY" . "3JlYXRlZA=="), "_1843593be57232afc0cebb3db824fa2" . "1" => base64_decode("ZWRpdF90b3BpY19saW5rLnZpc2lib" . "GU="), "_043583fc6e4063be6ec4a31bf95161" . "6c" => base64_decode("L3Byb2plY3RzLw=" . "="), "_4081311cd3a2563b5fe" . "f541bf08f914b" => base64_decode("ZGVsZXRlX2Zvcm" . "0uYWN0aW9u"), "_26c47b46f5140c3" . "cc89184c958625b5" . "a" => base64_decode("cHJvamVjdHMudG9w" . "aWMudXBkYXRlZA=="), "_0a6f79a080caf87b6dcca9f988" . "875b4c" => base64_decode("b3JnY2hhcn" . "QuY29tbW9u" . "LmRlbGV0ZW" . "RfdXNlcg=="), "t" . "o" . "p" . "i" . "c" => base64_decode("dG9wa" . "WM="), "projec" . "t_id" => base64_decode("cHJv" . "amVj" . "dF9p" . "ZA=="), "_4d707fab9" . "3bebb00bbe" . "69e8159697" . "c90" => base64_decode(""), "_08258ce08636fcdd1944f7cd8" . "eb93ce8" => base64_decode("b3duZXJ" . "fbGluay" . "5ib2R5"), "_6227066e0371" . "453ee71029e62" . "04a0ee1" => base64_decode("cHJvamVjdHMudG9waWMuY" . "3JlYXRl"), "_279c95ea88b4" . "68edfa530763d" . "2be1080" => base64_decode("Y3JlYXRlZC5" . "ib2R5"));
use Claromentis\Comments\CommentsRepository;
use Claromentis\Common\ApplicationMiscellany\RequestHandler;
use Claromentis\Core\Event\EventDispatcher;
use Claromentis\Core\Http\RedirectResponse;
use Claromentis\Core\Http\RequestData;
use Claromentis\Core\Http\RequestDataException;
use Claromentis\Core\Http\RequestDataTokenException;
use Claromentis\Core\Http\TemplaterCallResponse;
use Claromentis\Core\Localization\Lmsg;
use Claromentis\Core\Security\Exception\AccessDeniedException;
use Claromentis\Core\Security\SecurityContext;
use Claromentis\People;
use Claromentis\Projects\Comments\CommentableTopic;
use Claromentis\Projects\Api\TopicApi;
use Claromentis\Projects\Entity\Topic;
use Claromentis\Projects\Exceptions\TopicDeletionException;
use Claromentis\Projects\Exceptions\TopicValidationException;
use Claromentis\Projects\PermissionsChecker;
use Claromentis\Projects\ProjectsBreadcrumbGenerator;
use Claromentis\Projects\ProjectsPlugin;
use Claromentis\Projects\Dialog\TopicDialog;
use Claromentis\Projects\Repository\ProjectRepository;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
class TopicController
{
    
    
    
    
    protected $topic_api;
    
    
    
    
    protected $project_provider;
    
    
    
    
    protected $comments_repository;
    
    
    
    
    protected $breadcrumb_generator;
    
    
    
    
    protected $people_url_generator;
    
    
    
    
    protected $url_generator;
    
    
    
    
    protected $dispatcher;
    
    
    
    
    protected $handler;
    
    
    
    
    protected $dialog;
    
    
    
    
    protected $lmsg;
    public function __construct(TopicApi $topic_api, ProjectRepository $project_repository, CommentsRepository $comments_repository, ProjectsBreadcrumbGenerator $breadcrumb_generator, People\UrlGenerator $people_url_generator, UrlGeneratorInterface $url_generator, EventDispatcher $dispatcher, RequestHandler $handler, TopicDialog $dialog, Lmsg $lmsg)
    {
        $this->topic_api = $topic_api;
        $this->project_provider = $project_repository;
        $this->comments_repository = $comments_repository;
        $this->breadcrumb_generator = $breadcrumb_generator;
        $this->people_url_generator = $people_url_generator;
        $this->url_generator = $url_generator;
        $this->dispatcher = $dispatcher;
        $this->handler = $handler;
        $this->dialog = $dialog;
        $this->lmsg = $lmsg;
    }
    
    
    
    
    
    
    
    public function Show(PermissionsChecker $permissions_checker, Topic $topic, int $project_id)
    {
        $_bbcdf77b6167a26a35212c8181097030 = [];
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_e7ab4fbc30" . "3524d92fc41" . "5318f963d8a"]] = $topic->id;
        $project = $this->project_provider->GetProject($topic->project_id);
        if ($topic->project_id !== $project_id) {
            throw new NotFoundHttpException();
        }
        if (!$project->CanIViewComment($permissions_checker)) {
            return RedirectResponse::httpRedirect($GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_043583fc6e4063be6ec" . "4a31bf951616c"], ($this->lmsg)($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_10291c44" . "0e05c67b7" . "d794a7de6" . "ee906f"]), true);
        }
        $_5e1e8bdeb7dc6725dab2802927e4f193 = new CommentableTopic();
        $_5e1e8bdeb7dc6725dab2802927e4f193->Load($topic->id);
        $_c401755cc1cb1167e8bc97aee7e193dc = $this->comments_repository->GetCommentsCount($_5e1e8bdeb7dc6725dab2802927e4f193);
        $_c4d674abe9291be143b224c411958fcf = $topic->owner;
        $_51649d1ca48d98d3171258fe24d15076 = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_4d707fab9" . "3bebb00bbe" . "69e8159697" . "c90"];
        if ($_c4d674abe9291be143b224c411958fcf) {
            $_8cca4dd34e20c5344bb2a30f2533c4e5 = $_c4d674abe9291be143b224c411958fcf->fullname;
            if (!$_c4d674abe9291be143b224c411958fcf->blocked) {
                $_51649d1ca48d98d3171258fe24d15076 = \User::GetProfileUrl($_c4d674abe9291be143b224c411958fcf->id, false);
            }
        } else {
            $_8cca4dd34e20c5344bb2a30f2533c4e5 = ($this->lmsg)($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_0a6f79a080" . "caf87b6dcca" . "9f988875b4c"]);
            if ($topic->owner_id === 0) {
                $_8cca4dd34e20c5344bb2a30f2533c4e5 = ($this->lmsg)($GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_0066ffe735b7db5ee2e3809" . "18e0541f8"]);
            }
        }
        if (!$_51649d1ca48d98d3171258fe24d15076) {
            $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_533ab5b4c9f0dc0efaf67d509" . "9df811f"]] = 0;
            $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_71064868" . "e71280f12" . "2abdb2262" . "52d0af"]] = 1;
        }
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_ec7df3fc85624b2f6a0751638802ec1" . "c"]] = $topic->title;
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_18dff24b6c6fbb8acc19cc641faa2" . "ff2"]] = $topic->description ?? $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_4d707fab93bebb00bbe69e81596" . "97c90"];
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_89d65ffd" . "4624f644a" . "8f7670c08" . "86ebda"]] = $_51649d1ca48d98d3171258fe24d15076;
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_08258ce08636fcdd1944f7cd8" . "eb93ce8"]] = $_8cca4dd34e20c5344bb2a30f2533c4e5;
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_0894e7939c4ffdbee6f82acb5ea5d4d" . "9"]] = $_8cca4dd34e20c5344bb2a30f2533c4e5;
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_c5ae6af0d28c2ed850be" . "a1bbaccdd015"]] = $_c401755cc1cb1167e8bc97aee7e193dc;
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_279c95ea88b468edfa" . "530763d2be1080"]] = $topic->created->getDate(DATE_FORMAT_CLA_LONG_DATE);
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_d851e116" . "93095c2df" . "5aeddaf4a" . "fda6ae"]] = $topic->modified->getDate(DATE_FORMAT_CLA_LONG_DATE);
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_db9a5043d2be38dfba" . "a1d178a4075583"]] = $this->url_generator->generate(ProjectsPlugin::EDIT_TOPIC_ROUTE, [$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["projec" . "t_id"] => $project_id, $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["topi" . "c"] => $topic->id]);
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_4081311cd3a2563b5fef54" . "1bf08f914b"]] = $this->url_generator->generate(ProjectsPlugin::DELETE_TOPIC_ROUTE, [$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["project_" . "id"] => $project_id, $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["topi" . "c"] => $topic->id]);
        $_48ca4427015380c918e6f6e32ca7bea1 = $project->CanIEditTopic($permissions_checker, $topic);
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_3c8c6bfa4600e3c" . "445c7aa677cb39a4" . "0"]] = $_48ca4427015380c918e6f6e32ca7bea1;
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_1843593be57232" . "afc0cebb3db824f" . "a21"]] = $_48ca4427015380c918e6f6e32ca7bea1;
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_dfd6609684" . "f3720447d83" . "8be396f4c49"]] = $_48ca4427015380c918e6f6e32ca7bea1;
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_2b281c8f6f425" . "f036ca989b728d" . "87b43"]] = $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_7aefd482de7885f4293c2926df2" . "8c235"]($this->breadcrumb_generator->ViewTopic($project, $topic));
        return new TemplaterCallResponse($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_c91bf2a5cd3264f51259b" . "22516dd36db"], $_bbcdf77b6167a26a35212c8181097030, ($this->lmsg)($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_64282ac" . "182bac83" . "fb33fa75" . "27236487" . "a"], $topic->title));
    }
    
    
    
    
    
    
    
    
    
    
    public function ShowEdit(PermissionsChecker $permissions_checker, int $project_id, Topic $topic, TopicDialog $dialog, string $message = '', bool $is_error_message = false)
    {
        if ($topic->project_id && $topic->project_id !== $project_id) {
            throw new NotFoundHttpException();
        }
        $project = $this->project_provider->GetProject($project_id);
        if (!$project->CanIEditTopic($permissions_checker, $topic)) {
            if ($topic->id) {
                if (!$project->CanIViewTopic($permissions_checker, $topic)) {
                    $_f364c3af8b2f3df67d17ecd6126da47d = $this->url_generator->generate(ProjectsPlugin::VIEW_TOPIC_ROUTE, [$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["topi" . "c"] => $topic->id, $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["proje" . "ct_id"] => $project->GetId()]);
                } else {
                    $_f364c3af8b2f3df67d17ecd6126da47d = $this->url_generator->generate(ProjectsPlugin::PROJECT_ROUTE, [$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["projec" . "t_id"] => $project->GetId()]);
                }
                return RedirectResponse::httpRedirect($_f364c3af8b2f3df67d17ecd6126da47d, ($this->lmsg)($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_b9e69cfd341b88cbabae108b909" . "6078f"]), true);
            }
            return RedirectResponse::httpRedirect($this->url_generator->generate(ProjectsPlugin::PROJECT_ROUTE, [$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["proj" . "ect_" . "id"] => $project->GetId()]), ($this->lmsg)($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_7a7d52f1da6116b2ba02" . "83bc49ea6169"]), true);
        }
        $_bbcdf77b6167a26a35212c8181097030 = [];
        $_678d945258a520c3df1c42fe4b558f34 = $topic->id ? ($this->lmsg)($GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_759550b88b27633d1f" . "d141ab28641b86"], $topic->title) : ($this->lmsg)($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_6227066e03" . "71453ee7102" . "9e6204a0ee1"]);
        $_cdf9eb37da9dded8851e58dae00e935e = $topic->id ? $this->breadcrumb_generator->EditTopic($project, $topic) : $this->breadcrumb_generator->CreateTopic($project);
        $_bbcdf77b6167a26a35212c8181097030 = $_bbcdf77b6167a26a35212c8181097030 + $dialog->Show($topic);
        if ($topic->project_id) {
            $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_1cc2e9c9" . "bc51aa153" . "7ad5ba5b9" . "956cd0"]] = $this->url_generator->generate(ProjectsPlugin::VIEW_TOPIC_ROUTE, [$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["top" . "ic"] => $topic->id, $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["proje" . "ct_id"] => $project_id]);
        } else {
            $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_1cc2e9c9bc51a" . "a1537ad5ba5b99" . "56cd0"]] = $this->url_generator->generate(ProjectsPlugin::PROJECT_ROUTE, [$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["pro" . "jec" . "t_i" . "d"] => $project_id]) . $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_b663a44bd97" . "12bc09564139" . "d4db1cc2a"];
        }
        $_bbcdf77b6167a26a35212c8181097030[$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_2b281c8" . "f6f425f0" . "36ca989b" . "728d87b4" . "3"]] = $GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_7aefd482de7885f429" . "3c2926df28c235"]($_cdf9eb37da9dded8851e58dae00e935e);
        $_fd5a3a643834299cbdadfc3540ba0bcb = new TemplaterCallResponse($GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_bdc5199690" . "2510d56899e" . "6b1504195a3"], $_bbcdf77b6167a26a35212c8181097030, $_678d945258a520c3df1c42fe4b558f34);
        if ($message) {
            $_fd5a3a643834299cbdadfc3540ba0bcb->SetMessage($message, $is_error_message);
        }
        return $_fd5a3a643834299cbdadfc3540ba0bcb;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    public function DoEdit(PermissionsChecker $permissions_checker, int $project_id, Topic $topic, SecurityContext $context, RequestData $request_data)
    {
        $project = $this->project_provider->GetProject($project_id);
        if (!$project->CanIEditTopic($permissions_checker, $topic)) {
            throw new AccessDeniedException();
        }
        try {
            $request_data->CheckToken();
            $this->topic_api->Update($topic, $this->dialog->TopicDataFromRequest($request_data, $context, $project_id));
        } catch (TopicValidationException $_fe441aa3ef350bfb1a1a1ad8520dd530) {
            $_b791059c94b285cdf1c90ca6f3a8f2a6 = new Request([], [], [$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_b4f8623d4c09772f99f" . "995e1b339b756"] => self::class . $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_b4ffb533a3ef65e495b8ebd37889" . "f0fa"], $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["proj" . "ect_" . "id"] => $project_id, $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["topi" . "c"] => $topic, $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["me" . "ss" . "ag" . "e"] => $_fe441aa3ef350bfb1a1a1ad8520dd530->getMessage(), $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["is_error_messa" . "ge"] => true]);
            return $this->handler->DealWithIt($_b791059c94b285cdf1c90ca6f3a8f2a6, HttpKernelInterface::SUB_REQUEST);
        }
        return RedirectResponse::httpRedirect($this->url_generator->generate(ProjectsPlugin::VIEW_TOPIC_ROUTE, [$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["proj" . "ect_" . "id"] => $project_id, $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["to" . "pi" . "c"] => $topic->id]), $topic->id ? ($this->lmsg)($GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_26c47b46f" . "5140c3cc89" . "184c958625" . "b5a"]) : ($this->lmsg)($GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_a19440cccfaf8fbd9f5d" . "e9eaaba22059"]));
    }
    
    
    
    
    
    
    
    
    
    
    public function DoDelete(PermissionsChecker $permissions_checker, Topic $topic, int $project_id, RequestData $request_data)
    {
        $project = $this->project_provider->GetProject($project_id);
        if (!$project->CanIDeleteTopic($permissions_checker, $topic)) {
            throw new AccessDeniedException();
        }
        $request_data->CheckToken();
        try {
            $this->topic_api->Delete($topic);
        } catch (TopicDeletionException $_fe441aa3ef350bfb1a1a1ad8520dd530) {
            $_b791059c94b285cdf1c90ca6f3a8f2a6 = new Request([], [], [$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_b4f8623d4c09772f99f995e1b339b" . "756"] => self::class . $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_b4ffb533a3ef" . "65e495b8ebd37" . "889f0fa"], $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["project_i" . "d"] => $project_id, $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["topi" . "c"] => $topic, $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["mes" . "sag" . "e"] => $_fe441aa3ef350bfb1a1a1ad8520dd530->getMessage(), $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["is_error_mes" . "sage"] => true]);
            return $this->handler->DealWithIt($_b791059c94b285cdf1c90ca6f3a8f2a6, HttpKernelInterface::SUB_REQUEST);
        }
        return RedirectResponse::httpRedirect($GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_043583fc6e4" . "063be6ec4a31" . "bf951616c"] . $project_id . $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_14fb76995c1bfa46f30ce5b9e3c665" . "61"], ($this->lmsg)($GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_916f617cc73c4715ad36fab5" . "8944f48b"]));
    }
}