Files
dockerfluxodecaixapro/cache/twig/31/31011eb923bb38401bc52bc05a337078.php
T
2026-09-01 10:46:29 -03:00

502 lines
20 KiB
PHP
Executable File

<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* contact/views/index.twig */
class __TwigTemplate_deceba250b5979e30973458887d46339 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'head' => [$this, 'block_head'],
'layout_body' => [$this, 'block_layout_body'],
'scripts' => [$this, 'block_scripts'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "@index/layout.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$this->parent = $this->load("@index/layout.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.title"), "html", null, true);
yield " - ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(($context["platformName"] ?? null), "html", null, true);
yield from [];
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_head(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 6
yield " <style>
:root {
--primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
--ai-gradient: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
--dark-bg: #0f172a;
}
body {
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background: #f8fafc !important;
}
.contact-hero {
background: var(--dark-bg);
background-image:
radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
color: white;
padding: 100px 0 60px;
text-align: center;
}
.contact-badge {
background: rgba(59, 130, 246, 0.1);
border: 1px solid rgba(59, 130, 246, 0.3);
color: #60a5fa;
padding: 8px 20px;
border-radius: 50px;
font-size: 0.9rem;
font-weight: 600;
display: inline-block;
margin-bottom: 20px;
}
.contact-title {
font-size: 3rem;
font-weight: 800;
margin-bottom: 20px;
}
.contact-card {
background: white;
border-radius: 24px;
border: 1px solid #e2e8f0;
overflow: hidden;
box-shadow: 0 20px 40px rgba(0,0,0,0.05);
margin-top: -50px;
}
.contact-info-sidebar {
background: #f1f5f9;
padding: 40px;
height: 100%;
}
.info-item {
display: flex;
gap: 20px;
margin-bottom: 30px;
}
.info-icon {
width: 48px;
height: 48px;
background: white;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.25rem;
color: #3b82f6;
box-shadow: 0 4px 10px rgba(0,0,0,0.05);
flex-shrink: 0;
}
.info-content h5 {
font-weight: 700;
margin-bottom: 5px;
color: #0f172a;
}
.info-content p {
color: #64748b;
margin-bottom: 0;
}
.contact-form-body {
padding: 40px;
}
.form-label {
font-weight: 600;
color: #334155;
margin-bottom: 8px;
}
.form-control {
border-radius: 12px;
padding: 12px 16px;
border: 1px solid #e2e8f0;
transition: all 0.3s;
}
.form-control:focus {
border-color: #3b82f6;
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.btn-submit {
background: var(--primary-gradient);
color: white;
border: none;
padding: 14px 30px;
border-radius: 12px;
font-weight: 700;
transition: all 0.3s;
width: 100%;
}
.btn-submit:hover {
transform: translateY(-2px);
box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
color: white;
}
.captcha-box {
background: #f8fafc;
border-radius: 12px;
padding: 15px;
border: 1px dashed #cbd5e1;
margin-bottom: 20px;
}
.alert-toast {
position: fixed;
top: 20px;
right: 20px;
z-index: 1060;
min-width: 300px;
}
</style>
";
yield from [];
}
// line 149
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_layout_body(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 150
yield " <div class=\"alert-toast\" x-data=\"{ show: false, message: '', type: 'success' }\"
@show-alert.window=\"show = true; message = \$event.detail.message; type = \$event.detail.type; setTimeout(() => show = false, 5000)\">
<div x-show=\"show\" x-transition
:class=\"`alert alert-\${type} shadow-lg border-0 rounded-4`\" role=\"alert\">
<div class=\"d-flex align-items-center gap-2\">
<i class=\"bi\" :class=\"type === 'success' ? 'bi-check-circle-fill' : 'bi-exclamation-triangle-fill'\"></i>
<span x-text=\"message\"></span>
</div>
</div>
</div>
<section class=\"contact-hero\">
<div class=\"container\">
<div class=\"contact-badge\">Contato</div>
<h1 class=\"contact-title\">";
// line 164
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.title"), "html", null, true);
yield "</h1>
<p class=\"lead opacity-75 mx-auto\" style=\"max-width: 600px;\">
";
// line 166
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.subtitle"), "html", null, true);
yield "
</p>
</div>
</section>
<section class=\"pb-5\">
<div class=\"container\">
<div class=\"contact-card\">
<div class=\"row g-0\">
<div class=\"col-lg-5\">
<div class=\"contact-info-sidebar\">
<h3 class=\"fw-bold mb-4\" style=\"color: #0f172a;\">Informações</h3>
<div class=\"info-item\">
<div class=\"info-icon\"><i class=\"bi bi-geo-alt\"></i></div>
<div class=\"info-content\">
<h5>";
// line 182
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.address_title"), "html", null, true);
yield "</h5>
<p>";
// line 183
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.address_line1"), "html", null, true);
yield "<br>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.address_line2"), "html", null, true);
yield "</p>
</div>
</div>
<div class=\"info-item\">
<div class=\"info-icon\"><i class=\"bi bi-telephone\"></i></div>
<div class=\"info-content\">
<h5>";
// line 190
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.phone_title"), "html", null, true);
yield "</h5>
<p>";
// line 191
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.phone_number"), "html", null, true);
yield "<br><small>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.phone_hours"), "html", null, true);
yield "</small></p>
</div>
</div>
<div class=\"info-item\">
<div class=\"info-icon\"><i class=\"bi bi-envelope\"></i></div>
<div class=\"info-content\">
<h5>";
// line 198
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.email_title"), "html", null, true);
yield "</h5>
<p>";
// line 199
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.email_info"), "html", null, true);
if ((($tmp = $this->env->getFunction('__')->getCallable()("contact.email_support")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
yield "<br>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.email_support"), "html", null, true);
}
yield "</p>
</div>
</div>
</div>
</div>
<div class=\"col-lg-7\">
<div class=\"contact-form-body\" x-data=\"contactForm()\">
<h3 class=\"fw-bold mb-4\" style=\"color: #0f172a;\">";
// line 206
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.form_title"), "html", null, true);
yield "</h3>
<form @submit.prevent=\"submitForm\">
<div class=\"row\">
<div class=\"col-md-6 mb-3\">
<label class=\"form-label\">";
// line 210
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.form_name"), "html", null, true);
yield "</label>
<input type=\"text\" class=\"form-control\" x-model=\"formData.name\" required placeholder=\"Seu nome completo\">
</div>
<div class=\"col-md-6 mb-3\">
<label class=\"form-label\">";
// line 214
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.form_email"), "html", null, true);
yield "</label>
<input type=\"email\" class=\"form-control\" x-model=\"formData.email\" required placeholder=\"seu@email.com\">
</div>
</div>
<div class=\"mb-3\">
<label class=\"form-label\">";
// line 219
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.form_subject"), "html", null, true);
yield "</label>
<input type=\"text\" class=\"form-control\" x-model=\"formData.subject\" required placeholder=\"Como podemos ajudar?\">
</div>
<div class=\"mb-4\">
<label class=\"form-label\">";
// line 223
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.form_message"), "html", null, true);
yield "</label>
<textarea class=\"form-control\" rows=\"5\" x-model=\"formData.message\" required placeholder=\"Descreva sua dúvida ou sugestão...\"></textarea>
</div>
";
// line 227
if ((($tmp = ($context["require_captcha_contact"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 228
yield " <div class=\"captcha-box\" x-data=\"{
num1: 0, num2: 0, userAnswer: '', solved: false,
generate() {
this.num1 = Math.floor(Math.random() * 10) + 1;
this.num2 = Math.floor(Math.random() * 10) + 1;
this.userAnswer = ''; this.solved = false;
},
check() { this.solved = (parseInt(this.userAnswer) === (this.num1 + this.num2)); }
}\" x-init=\"generate()\" @reset-captcha.window=\"generate()\">
<label class=\"form-label d-block mb-2\">";
// line 237
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.security_check"), "html", null, true);
yield "</label>
<div class=\"d-flex align-items-center gap-3\">
<div class=\"bg-white px-3 py-2 rounded border fw-bold\">
<span x-text=\"num1\"></span> + <span x-text=\"num2\"></span> =
</div>
<input type=\"number\" class=\"form-control\" style=\"width: 100px;\" x-model=\"userAnswer\" @input=\"check()\" placeholder=\"?\">
<span x-show=\"solved\" class=\"text-success\"><i class=\"bi bi-check-circle-fill\"></i></span>
</div>
<input type=\"hidden\" name=\"captcha_valid\" :value=\"solved ? '1' : ''\">
</div>
";
}
// line 248
yield "
<button type=\"submit\" class=\"btn-submit\" :disabled=\"loading\">
<span x-show=\"!loading\"><i class=\"bi bi-send-fill me-2\"></i> ";
// line 250
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.form_submit"), "html", null, true);
yield "</span>
<span x-show=\"loading\" class=\"spinner-border spinner-border-sm me-2\"></span>
<span x-show=\"loading\">";
// line 252
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.sending"), "html", null, true);
yield "</span>
</button>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
";
yield from [];
}
// line 263
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_scripts(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 264
yield "<script>
function contactForm() {
return {
formData: { name: '', email: '', subject: '', message: '' },
loading: false,
submitForm() {
const captchaInput = document.querySelector('input[name=\"captcha_valid\"]');
if (captchaInput && captchaInput.value !== '1') {
window.dispatchEvent(new CustomEvent('show-alert', {
detail: { message: '";
// line 273
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.js_invalid_captcha"), "html", null, true);
yield "', type: 'danger' }
}));
return;
}
this.loading = true;
// Inclui o captcha_valid no corpo da requisição JSON para o backend
const payload = { ...this.formData };
if (captchaInput) {
payload.captcha_valid = captchaInput.value;
}
fetch('/contact/submit', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' },
body: JSON.stringify(payload)
})
.then(res => res.json())
.then(data => {
if (data.success) {
window.dispatchEvent(new CustomEvent('show-alert', {
detail: { message: '";
// line 295
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.js_success"), "html", null, true);
yield "', type: 'success' }
}));
this.formData = { name: '', email: '', subject: '', message: '' };
window.dispatchEvent(new CustomEvent('reset-captcha'));
} else {
throw new Error(data.message);
}
})
.catch(err => {
window.dispatchEvent(new CustomEvent('show-alert', {
detail: { message: err.message || '";
// line 305
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("contact.js_error"), "html", null, true);
yield "', type: 'danger' }
}));
})
.finally(() => { this.loading = false; });
}
}
}
</script>
";
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "contact/views/index.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 460 => 305, 447 => 295, 422 => 273, 411 => 264, 404 => 263, 389 => 252, 384 => 250, 380 => 248, 366 => 237, 355 => 228, 353 => 227, 346 => 223, 339 => 219, 331 => 214, 324 => 210, 317 => 206, 303 => 199, 299 => 198, 287 => 191, 283 => 190, 271 => 183, 267 => 182, 248 => 166, 243 => 164, 227 => 150, 220 => 149, 74 => 6, 67 => 5, 54 => 3, 43 => 1,);
}
public function getSourceContext(): Source
{
return new Source("", "contact/views/index.twig", "/app/modules/contact/views/index.twig");
}
}