@extends('layout.master')

@push('plugin-styles')
@endpush

@section('content')
<div class="row">
    <div class="col s12">
        @include('componentes._breadcrumbs')
    </div>

    <div class="col-lg-12 grid-margin stretch-card">
        <div class="card">

            <div class="card-body">

                @if (session('status'))
                <div class="row clearfix">
                    <div class="col-sm-12">
                        <div class="alert alert-success">
                            {{ session('status') }}
                        </div>
                    </div>
                </div>
                @endif

                <h4 class="card-title">Editar Produtos</h4>
                <p class="card-description"> </p>

                @if ($errors->any())
                <div class="alert alert-danger">
                    <ul>
                        @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div><br />
                @endif

                <div class="auto-form-wrapper">

                    <ul class="nav nav-tabs">
                        <li class="active"><a data-toggle="tab" href="#menu1">Geral</a></li>
                        <li class=""><a data-toggle="tab" href="#menu2">Beneficios</a></li>
                        <li class=""><a data-toggle="tab" href="#menu3">Features</a></li>
                        <li class=""><a data-toggle="tab" href="#menu5">Cases Relacionados</a></li>
                        <li class=""><a data-toggle="tab" href="#menu6">Notícias Relacionadas</a></li>
                    </ul>

                    <div class="tab-content">
                        <div id="menu1" class="tab-pane show in active">
                            <form action="{{ route('produto.update', $obj->id)}}" method="post"
                                enctype="multipart/form-data">
                                {{ csrf_field() }}
                                {{ method_field('PUT') }}

                                <input type="hidden" name="old_image"
                                    value="{{ isset($obj->image) ? $obj->image : '' }}">
                                <input type="hidden" name="old_imageprod"
                                    value="{{ isset($obj->imageprod) ? $obj->imageprod : '' }}">
                                <input type="hidden" name="old_imagecta"
                                    value="{{ isset($obj->imagecta) ? $obj->imagecta : '' }}">
                                <input type="hidden" name="old_imagectafooter"
                                    value="{{ isset($obj->imagectafooter) ? $obj->imagectafooter : '' }}">
                                <input type="hidden" name="old_videoimagecta"
                                    value="{{ isset($obj->videoimagecta) ? $obj->videoimagecta : '' }}">

                                <h5 class="title_section">Informções Gerais</h5>
                                <div class="row clearfix">
                                    <div class="col-sm-12">
                                        <div class="form-check form-check-flat">
                                            <label class="form-check-label">
                                              <input type="checkbox" class="form-check-input" name="linkinterno" value="1" {{ ($obj->linkinterno == 1) ? 'checked' : '' }}>Não Possui Página Interna 
                                            </label>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <select name="solucao_id" id="solucao_id" class="validate form-control">
                                                <option value=""> Selecione uma Solução</option>
                                                    @if($solucoes)
                                                        @foreach($solucoes as $solucao)
                                                        <option value="{{ $solucao->id }}"
                                                            {{ @$obj->solucao->id == $solucao->id ? 'selected' : ''}}>
                                                            {{@$solucao->segmento->name . ' - ' . $solucao->name}}
                                                        </option>
                                                        @endforeach
                                                    @endif
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-field">
                                                <select name="language" id="language" class="form-control" required>
                                                    <option value="">Selecione um Idioma</option>
                                                    <option value="pt"
                                                        {{ @$obj->language_id == 'pt' ? 'selected' : ''}}>Português
                                                    </option>
                                                    <option value="es"
                                                        {{ @$obj->language_id == 'es' ? 'selected' : ''}}>Espanhol
                                                    </option>
                                                    <option value="en"
                                                        {{ @$obj->language_id == 'en' ? 'selected' : ''}}>Inglês
                                                    </option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>



                                <div class="row clearfix">
                                    <div class="col-sm-12">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="name" id="name" class="validate form-control"
                                                    Placeholder="Nome do Produto"
                                                    value="{{ isset($obj->name) ?  $obj->name : old('name')}}">
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="shortname" id="shortname"
                                                    class="validate form-control"
                                                    value="{{ isset($obj->shortname) ?  $obj->shortname : old('shortname')}}"
                                                    Placeholder="Nome Reduzido do Produto" required>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <p>Imagem Produto</p>
                                            <div class="input-group">
                                                <input type="file" name="imageprod" id="imageprod" class="form-control">
                                            </div>
                                            <p>Tamanho da imagem: </p>
                                        </div>
                                    </div>
                                </div>

                                @if ($obj->imageprod != '')
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group content-img-imageprod">
                                                <img src="{{ isset($obj->imageprod) ?   url('storage/produto/'.$obj->imageprod) : '' }}" width="200px" />
                                                <a title="Remover Imagem" class="btn btn-icons btn-inverse-danger  bt-excluir-img" data-token="{{ csrf_token() }}" data-id="{{ $obj->id }}" data-pagina="produtos" data-campo="imageprod"><i class="mdi mdi-delete"></i></a>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            
                                        </div>
                                    </div>
                                </div>
                                @endif

                                   
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <p>Imagem Mobile</p>
                                            <div class="input-group">
                                                <input type="file" name="image_mobile" id="image_mobile" class="form-control">
                                            </div>
                                            <p>Tamanho da imagem: 375px X 812px</p>
                                        </div>
                                    </div>
                                </div>

                                @if( $obj->image_mobile != '' ) 
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group content-img-image_mobile">
                                            <img src="{{ isset($obj->image_mobile) ?   url('storage/produto/'.$obj->image_mobile) : '' }}" width="200px" />
                                            <a title="Remover Imagem" class="btn btn-icons btn-inverse-danger  bt-excluir-img" data-token="{{ csrf_token() }}" data-id="{{ $obj->id }}" data-pagina="produtos" data-campo="image_mobile"><i class="mdi mdi-delete"></i></a>    
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                @endif

                                <h5 class="title_section">Hero Page</h5>
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <p>Imagem Background</p>
                                            <div class="input-group">
                                                <input type="file" name="image" id="image" class="form-control">
                                            </div>
                                            <p>Tamanho da imagem: 1920 x 1066px</p>
                                        </div>
                                    </div>
                                </div>

                                

                                @if ($obj->image != '')
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group content-img-image">
                                                <img src="{{ isset($obj->image) ?   url('storage/produto/'.$obj->image) : '' }}"
                                                    width="200px" />
                                                <a title="Remover Imagem" class="btn btn-icons btn-inverse-danger  bt-excluir-img" data-token="{{ csrf_token() }}" data-id="{{ $obj->id }}" data-pagina="produtos" data-campo="image"><i class="mdi mdi-delete"></i></a>    
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                @endif
                                
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="title" id="title"
                                                    class="validate form-control"
                                                    value="{{ isset($obj->title) ?  $obj->title : old('title')}}"
                                                    Placeholder="Título" >
                                            </div>
                                        </div>
                                    </div>
                                </div>


                                <div class="row clearfix">
                                    <div class="col-sm-12">
                                        <div class="form-group">
                                            <p>Descrição</p>
                                            <div class="input-group">
                                                <textarea name="description" id="description"
                                                    class="description">{{ isset($obj->description) ?  $obj->description : old('description')}}</textarea>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="btncta" id="btncta"
                                                    class="validate form-control" 
                                                    Placeholder="Botão Cta"
                                                    value="{{ isset($obj->btncta) ?  $obj->btncta : old('btncta')}}">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="linkbtncta" id="linkbtncta"
                                                    class="validate form-control" 
                                                    Placeholder="Link do botão Cta"
                                                    value="{{ isset($obj->linkbtncta) ?  $obj->linkbtncta : old('linkbtncta')}}">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="bt_color_cta" id="bt_color_cta" class="validate form-control"
                                                    value="{{ isset($obj->bt_color_cta) ?  $obj->bt_color_cta : old('bt_color_cta')}}"
                                                    Placeholder="Cor do botão" >
                                            </div>
                                        </div>
                                    </div>
                                
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <select name="targethero" id="targethero" class="form-control" >
                                                    <option value="">Selecione um Target</option>
                                                    <option value="0" {{ ($obj->targethero == 0) ?  "selected" : ''}}>Abrir na mesma Aba</option>
                                                    <option value="1" {{ ($obj->targethero == 1) ?  "selected" : ''}}>Abrir em nova Aba</option>
                                                    <option value="2" {{ ($obj->targethero == 2) ?  "selected" : ''}}>Abrir Modal de Contato</option>
                                                </select>
                                                
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <h5 class="title_section">Depoimentos</h5>
                                <div class="row clearfix">
                                    <div class="col-sm-12">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="depoimento_titulo" id="depoimento_titulo" class="validate form-control"
                                                    value="{{ isset($obj->depoimento_titulo) ?  $obj->depoimento_titulo : old('depoimento_titulo')}}"
                                                    Placeholder="Título" >
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <h5 class="title_section">Video</h5>

                                <div class="row clearfix">
                                    <div class="col-sm-12">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="videotitulocta" id="videotitulocta" class="validate form-control"
                                                    value="{{ isset($obj->videotitulocta) ?  $obj->videotitulocta : old('videotitulocta')}}"
                                                    Placeholder="Título do Vídeo do Youtube" >
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <p>Imagem Background</p>
                                            <div class="input-group">
                                                <input type="file" name="videoimagecta" id="videoimagecta" class="form-control">
                                            </div>
                                            <p>Tamanho da imagem: 1920 x 540px</p>
                                        </div>
                                    </div>
                                </div>
                                @if( $obj->videoimagecta != '' )
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group content-img-videoimagecta">
                                            <img src="{{ isset($obj->videoimagecta) ?   url('storage/produto/'.$obj->videoimagecta) : '' }}"  width="200px"  />
                                            <a title="Remover Imagem" class="btn btn-icons btn-inverse-danger  bt-excluir-img" data-token="{{ csrf_token() }}" data-id="{{ $obj->id }}" data-pagina="solucaos" data-campo="videoimagecta"><i class="mdi mdi-delete"></i></a>    
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                @endif

                                <div class="row clearfix">
                                    <div class="col-sm-12">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="video" id="video" class="validate form-control"
                                                    value="{{ isset($obj->video) ?  $obj->video : old('video')}}"
                                                    Placeholder="Vídeo do Youtube" >
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="videobtncta" id="videobtncta" class="validate form-control"
                                                    value="{{ isset($obj->videobtncta) ?  $obj->videobtncta : old('videobtncta')}}"
                                                    Placeholder="Botão Vídeo CTA" >
                                            </div>
                                        </div>
                                    </div>
                                
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="videolinkcta" id="videolinkcta" class="validate form-control"
                                                    value="{{ isset($obj->videolinkcta) ?  $obj->videolinkcta : old('videolinkcta')}}"
                                                    Placeholder="Link Vídeo CTA" >
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="bt_color_video" id="bt_color_video" class="validate form-control"
                                                    value="{{ isset($obj->bt_color_video) ?  $obj->bt_color_video : old('bt_color_video')}}"
                                                    Placeholder="Cor do botão" >
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <h5 class="title_section">CTA para Contato</h5>
                                <div class="row clearfix">
                                    <div class="col-sm-12">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="titulocta_contato" id="titulocta_contato" class="validate form-control"
                                                    value="{{ isset($obj->titulocta_contato) ?  $obj->titulocta_contato : old('titulocta_contato')}}"
                                                    Placeholder="Título" >
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                

                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <p>Imagem Background</p>
                                            <div class="input-group">
                                                <input type="file" name="imagecta" id="imagecta" class="form-control">
                                            </div>
                                            <p>Tamanho da imagem: 1920 x 640px</p>
                                        </div>
                                    </div>
                                </div>

                                @if ($obj->imagecta != '')
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group content-img-imagecta">
                                                <img src="{{ isset($obj->imagecta) ?   url('storage/produto/'.$obj->imagecta) : '' }}"
                                                    width="200px" />
                                                <a title="Remover Imagem" class="btn btn-icons btn-inverse-danger  bt-excluir-img" data-token="{{ csrf_token() }}" data-id="{{ $obj->id }}" data-pagina="produtos" data-campo="imagecta"><i class="mdi mdi-delete"></i></a>    
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                @endif

                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="btncta_contato" id="btncta_contato"
                                                    class="validate form-control"
                                                    Placeholder="Botão Cta"
                                                    value="{{ isset($obj->btncta_contato) ?  $obj->btncta_contato : old('btncta_contato')}}">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="linkbtncta_contato" id="linkbtncta_contato"
                                                    class="validate form-control"
                                                    Placeholder="Link do botão Cta"
                                                    value="{{ isset($obj->linkbtncta_contato) ?  $obj->linkbtncta_contato : old('linkbtncta_contato')}}">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="bt_color_cta_contato" id="bt_color_cta_contato" class="validate form-control"
                                                    value="{{ isset($obj->bt_color_cta_contato) ?  $obj->bt_color_cta_contato : old('bt_color_cta_contato')}}"
                                                    Placeholder="Cor do botão" >
                                            </div>
                                        </div>
                                    </div>
                                
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <div class="form-check form-check-flat">
                                                    <label class="form-check-label">
                                                      <input type="checkbox" class="form-check-input" value="1" name="targetcta_contato" {{ ($obj->targetcta_contato == 1) ?  "checked" : ''}}>Abrir em nova Aba <i class="input-helper"></i></label>
                                                </div>
                                                
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <h5 class="title_section">CTA para Contato 2</h5>

                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="tituloctafooter" id="tituloctafooter" class="validate form-control"
                                                    value="{{ isset($obj->tituloctafooter) ?  $obj->tituloctafooter : old('tituloctafooter')}}"
                                                    Placeholder="Título" >
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <p>Imagem Background</p>
                                            <div class="input-group">
                                                <input type="file" name="imagectafooter" id="imagectafooter"
                                                    class="form-control">
                                            </div>
                                            <p>Tamanho da imagem: 1920 x 640px</p>
                                        </div>
                                    </div>
                                </div>

                                @if ($obj->imagectafooter != '')
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group content-img-imagectafooter">
                                                <img src="{{ isset($obj->imagectafooter) ?   url('storage/produto/'.$obj->imagectafooter) : '' }}" width="200px" />
                                                <a title="Remover Imagem" class="btn btn-icons btn-inverse-danger  bt-excluir-img" data-token="{{ csrf_token() }}" data-id="{{ $obj->id }}" data-pagina="produtos" data-campo="imagectafooter"><i class="mdi mdi-delete"></i></a>    
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                @endif

                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="btnctafooter" id="btnctafooter"
                                                    class="validate form-control"
                                                    Placeholder="Botão Cta"
                                                    value="{{ isset($obj->btnctafooter) ?  $obj->btnctafooter : old('btnctafooter')}}">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="btnlinkctafooter" id="btnlinkctafooter"
                                                    class="validate form-control"
                                                    Placeholder="Link do botão Cta"
                                                    value="{{ isset($obj->btnlinkctafooter) ?  $obj->btnlinkctafooter : old('btnlinkctafooter')}}">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="bt_color_cta_footer" id="bt_color_cta_footer" class="validate form-control"
                                                    value="{{ isset($obj->bt_color_cta_footer) ?  $obj->bt_color_cta_footer : old('bt_color_cta_footer')}}"
                                                    Placeholder="Cor do botão" >
                                            </div>
                                        </div>
                                    </div>
                                
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <select name="targetctafooter" id="targetctafooter" class="form-control" >
                                                    <option value="">Selecione um Target</option>
                                                    <option value="0" {{ ($obj->targetctafooter == 0) ?  "selected" : ''}}>Abrir na mesma Aba</option>
                                                    <option value="1" {{ ($obj->targetctafooter == 1) ?  "selected" : ''}}>Abrir em nova Aba</option>
                                                    <option value="2" {{ ($obj->targetctafooter == 2) ?  "selected" : ''}}>Abrir Modal de Contato</option>
                                                </select>
                                                
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                                <h5 class="title_section">Meta Tags</h5>
                                <div class="row clearfix">
                                    <div class="col-sm-12">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="meta_title" id="meta_title" class="validate form-control"
                                                    value="{{ isset($obj->meta_title) ?  $obj->meta_title : old('meta_title')}}"
                                                    Placeholder="Meta Title" >
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row clearfix">
                                    <div class="col-sm-12">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="meta_description" id="meta_description" class="validate form-control"
                                                    value="{{ isset($obj->meta_description) ?  $obj->meta_description : old('meta_description')}}"
                                                    Placeholder="Meta Description" >
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            
                                <div class="row clearfix">
                                    <div class="col-sm-4">
                                        <button class="btn btn-primary submit-btn btn-block">Atualizar</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <div id="menu2" class="tab-pane fade aba">
                            <form action="{{ route('produto.beneficio.update', $obj->id)}}" method="post"
                                enctype="multipart/form-data">
                                {{ csrf_field() }}
                                {{ method_field('PUT') }}

                                <input type="hidden" name="ben_id" value="{{ $obj->beneficioProduto->id }}">
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="ben_titulo" id="ben_titulo"
                                                    class="validate form-control"
                                                    value="{{ isset($obj->beneficioProduto->titulo) ?  $obj->beneficioProduto->titulo : old('ben_titulo')}}"
                                                    Placeholder="Título" required>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row clearfix">
                                    <div class="col-sm-12">
                                        <div class="form-group">
                                            <p>Descrição</p>
                                            <div class="input-group">
                                                <textarea name="ben_description" id="ben_description"
                                                    class="description">{{ isset($obj->beneficioProduto->description) ?  $obj->beneficioProduto->description : old('ben_description')}}</textarea>

                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row clearfix">
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="ben_bg_color" id="ben_bg_color"
                                                    class="validate form-control"
                                                    value="{{ isset($obj->beneficioProduto->bg_color) ?  $obj->beneficioProduto->bg_color : old('ben_bg_color')}}"
                                                    Placeholder="Background Color" >
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <p>Imagem</p>
                                            <div class="input-group">
                                                <input type="file" name="imagebeneficio" id="imagebeneficio" class="form-control">
                                            </div>
                                            <p>Tamanho da imagem: 1920 x 640px</p>
                                        </div>
                                    </div>
                                </div>

                                @if ($obj->beneficioProduto->imagebeneficio != '')
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group content-img-imagebeneficio">
                                                <img src="{{ isset($obj->beneficioProduto->imagebeneficio) ?   url('storage/solucao/'.$obj->beneficioProduto->imagebeneficio) : '' }}" width="200px" />
                                                <a title="Remover Imagem" class="btn btn-icons btn-inverse-danger btn_delete bt-excluir-img" data-token="{{ csrf_token() }}" data-id="{{ $obj->beneficioProduto->id }}" data-pagina="beneficio_produtos" data-campo="imagebeneficio"><i class="mdi mdi-delete"></i></a>    
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                @endif

                                <div class="row clearfix">
                                    <div class="col-sm-4">
                                        <button class="btn btn-primary submit-btn btn-block">Atualizar Benefício</button>
                                    </div>
                                </div>

                            </form>
                            <hr>
                            <h5 class="title_section">Itens</h5>

                            <form action="{{ route('produto.beneficio.item.store', $obj->id)}}" method="post"
                                enctype="multipart/form-data" id="itemBeneficio">
                                {{ csrf_field() }}

                                <input type="hidden" name="benId" id="benId" value="{{$obj->beneficioProduto->id}}">

                                <div class="itens">
                                    <div class="row clearfix">
                                        <div class="col-sm-3">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <select name="item_icon" id="item_icon" class="form-control">
                                                        @if($icones)
                                                            @foreach($icones as $ic)
                                                                <option value="{{$ic->id}}">{{$ic->id." - ".$ic->name}}</option>
                                                            @endforeach
                                                        @endif
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-6">
                                                <div class="form-group">
                                                    <div class="input-group">
                                                        <input type="text" name="item_titulo" id="item_titulo"
                                                            class="validate form-control" value="{{ old('item_titulo')}}"
                                                            Placeholder="Título">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    <div class="row clearfix">
                                        
                                        <div class="col-sm-9">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <input type="text" name="item_description" id="item_description"
                                                        class="validate form-control" value="{{ old('item_description')}}"
                                                        Placeholder="Descrição">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            
                                <div class="row clearfix">
                                    <div class="col-sm-3">
                                        <button class="btn btn-primary submit-btn btn-block">Adicionar Item</button>
                                    </div>
                                </div>
                            </form>
                            <div class="table-responsive sortable" id="listItensBeneficios">
                                @if ($beneficioItens)
                                <table class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th> Id </th>
                                            <th> Título </th>
                                            <th> Ações </th>
                                        </tr>
                                    </thead>
                                    <tbody>

                                        @forelse($beneficioItens as $item)
                                        <tr>
                                            <td>
                                                <input type="hidden" name="ids_items[]" value="{{$item->id }}"> {{$item->id }} 
                                                <input type="hidden" name="model_items" value="ProdutoBeneficioItens"> 
                                                <input type="hidden" name="parent_id_items" value="{{$obj->beneficioProduto->id}}"> 
                                            </td>
                                            <td>{{$item->titulo}}</td>
                                            <td  style="display:flex">
                                                <a title="Editar" class="btn btn-icons btn-inverse-warning myBtn" data-list="listItensBeneficios" data-obj="{{$obj->id}}" data-item="{{ $item->id }}" data-pagina="beneficio_produto_items"
                                                    data-titulo="{{ $item->titulo }}"
                                                    data-descricao="{{ $item->description }}"
                                                    data-icon="{{ $item->biblioteca_id }}"><i class="mdi mdi-grease-pencil"></i></a>
                                                <form
                                                    action="{{route('produto.beneficio.item.del')}}"
                                                    method="post" class=" ">
                                                    {{ method_field('DELETE')}}
                                                    {{csrf_field()}}
                                                    <button title="Deletar" class="btn btn-icons btn-inverse-danger itemBeneficioDel" 
                                                        data-token="{{ csrf_token() }}" data-produto="{{$obj->id}}" data-beneficio="{{$obj->beneficioProduto->id}}" data-item="{{$item->id}}">
                                                        <i class="mdi mdi-delete " ></i></button>
                                                </form>
                                            </td>
                                        </tr>
                                        @empty
                                        <tr>
                                            <td colspan="6">Nenhum registro encontrado.</td>
                                        </tr>
                                    @endforelse
                                    </tbody>
                                </table>
                                @endif
                            </div>
                        </div>
                        <div id="menu3" class="tab-pane fade aba">
                            <form action="{{ route('produto.feature.update', $obj->id)}}" method="post"
                                enctype="multipart/form-data">
                                {{ csrf_field() }}
                                {{ method_field('PUT') }}

                                <input type="hidden" name="fea_id" value="{{ $obj->featureProduto->id }}">
                                <div class="row clearfix">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="fea_titulo" id="fea_titulo"
                                                    class="validate form-control"
                                                    value="{{ isset($obj->featureProduto->titulo) ?  $obj->featureProduto->titulo : old('fea_titulo')}}"
                                                    Placeholder="Título" required>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row clearfix">
                                    <div class="col-sm-12">
                                        <div class="form-group">
                                            <p>Descrição</p>
                                            <div class="input-group">
                                                <textarea name="fea_description" id="fea_description"
                                                    class="description">{{ isset($obj->featureProduto->description) ?  $obj->featureProduto->description : old('fea_description')}}</textarea>

                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="row clearfix">
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <input type="text" name="fea_bg_color" id="fea_bg_color"
                                                    class="validate form-control"
                                                    value="{{ isset($obj->featureProduto->bg_color) ?  $obj->featureProduto->bg_color : old('fea_bg_color')}}"
                                                    Placeholder="Background Color" >
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row clearfix">
                                    <div class="col-sm-4">
                                        <button class="btn btn-primary submit-btn btn-block">Atualizar Feature</button>
                                    </div>
                                </div>

                            </form>
                            <hr>
                            <h5 class="title_section">Itens</h5>

                            <form action="{{ route('produto.feature.item.store', $obj->id)}}" method="post"
                                enctype="multipart/form-data" id="itemFeature">
                                {{ csrf_field() }}

                                <input type="hidden" name="feaId" id="feaId" value="{{$obj->featureProduto->id}}">

                                <div class="itens">
                                    <div class="row clearfix">
                                        <div class="col-sm-3">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <select name="item_icon" id="item_icon" class="form-control">
                                                        @if($icones)
                                                            @foreach($icones as $ic)
                                                                <option value="{{$ic->id}}">{{$ic->id." - ".$ic->name}}</option>
                                                            @endforeach
                                                        @endif
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-6">
                                                <div class="form-group">
                                                    <div class="input-group">
                                                        <input type="text" name="item_titulo" id="item_titulo"
                                                            class="validate form-control" value="{{ old('item_titulo')}}"
                                                            Placeholder="Título">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    <div class="row clearfix">
                                        
                                        <div class="col-sm-9">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <input type="text" name="item_description" id="item_description"
                                                        class="validate form-control" value="{{ old('item_description')}}"
                                                        Placeholder="Descrição">
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            
                                <div class="row clearfix">
                                    <div class="col-sm-3">
                                        <button class="btn btn-primary submit-btn btn-block">Adicionar Item</button>
                                    </div>
                                </div>
                            </form>
                            <div class="table-responsive" id="listItensFeatures">
                                @if ($featureItens)
                                <table class="table table-striped" id="sortable">
                                    <thead>
                                        <tr>
                                            <th> Id </th>
                                            <th> Título </th>
                                            <th> Ações </th>
                                        </tr>
                                    </thead>
                                    <tbody>

                                        @forelse($featureItens as $item)
                                        <tr>
                                            <td>
                                                <input type="hidden" name="ids[]" value="{{$item->id }}"> {{$item->id }} 
                                                <input type="hidden" name="model" value="ProdutofeatureItens"> 
                                                <input type="hidden" name="parent_id" value="{{$obj->featureProduto->id}}"> 
                                            </td>
                                            <td>{{$item->titulo}}</td>
                                            <td  style="display:flex">
                                                <a title="Editar" class="btn btn-icons btn-inverse-warning myBtn" data-list="listItensFeatures" data-obj="{{$obj->id}}" data-item="{{ $item->id }}" data-pagina="feature_produto_items"
                                                    data-titulo="{{ $item->titulo }}"
                                                    data-descricao="{{ $item->description }}"
                                                    data-icon="{{ $item->biblioteca_id }}"><i class="mdi mdi-grease-pencil"></i></a>
                                                <form
                                                    action="{{route('produto.feature.item.del')}}"
                                                    method="post" class=" ">
                                                    {{ method_field('DELETE')}}
                                                    {{csrf_field()}}
                                                    <button title="Deletar" class="btn btn-icons btn-inverse-danger  itemFeatureDel" 
                                                        data-token="{{ csrf_token() }}" data-produto="{{$obj->id}}" data-feature="{{$obj->featureProduto->id}}" data-item="{{$item->id}}">
                                                        <i class="mdi mdi-delete " ></i></button>
                                                </form>
                                            </td>
                                        </tr>
                                        @empty
                                        <tr>
                                            <td colspan="6">Nenhum registro encontrado.</td>
                                        </tr>
                                    @endforelse
                                    </tbody>
                                </table>
                                @endif
                            </div>
                        </div>

                        
                        <div id="menu5" class="tab-pane fade aba">
                            <div class="card-body">
                                <h4 class="card-title">Cases</h4>
                                <form action="{{ route('produto.case.store', $obj->id)}}" method="post"
                                    enctype="multipart/form-data">
                                    {{ csrf_field() }}
                                    <div class="row clearfix">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <select name="cases[]" id="cases" class="form-multiselect" multiple>
                                                        @if ($cases)
                                                        @foreach($cases as $case)
                                                        <option value="{{$case->id}}">{{$case->title}}</option>
                                                        @endforeach
                                                        @endif
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-2">
                                            <button class="btn btn-primary submit-btn btn-block">Adicionar</button>
                                        </div>
                                    </div>

                                </form>


                                <div class="table-responsive" id="listCasesProduto">
                                    @if ($obj->cases)
                                    <table class="table table-striped">
                                        <thead>
                                            <tr>
                                                <th> Id </th>
                                                <th> Título </th>
                                                <th> Ações </th>
                                            </tr>
                                        </thead>
                                        <tbody>

                                            @forelse($obj->cases as $case)
                                            @if($case->tipo == 'case')
                                            <tr>
                                                <td>{{$case->id }} </td>
                                                <td>{{$case->title}}</td>
                                                <td>
                                                    <form
                                                        action="{{route('produto.case.del')}}"
                                                        method="post" class="">
                                                        {{ method_field('DELETE')}}
                                                        {{csrf_field()}}
                                                        <button title="Deletar" class="btn btn-icons btn-inverse-danger  caseProdutoDel"  data-token="{{ csrf_token() }}" data-produto="{{$obj->id}}" data-case="{{ $case->id }}">
                                                            <i class="mdi mdi-delete "></i></button>
                                                    </form>
                                                </td>
                                            </tr>
                                            @endif
                                            @empty
                                        </tbody>
                                        <tr>
                                            <td colspan="6">Nenhum registro encontrado.</td>
                                        </tr>
                                        @endforelse
                                    </table>
                                    @endif
                                </div>
                            </div>
                        </div>
                        <div id="menu6" class="tab-pane fade aba">
                            <div class="card-body">
                                <h4 class="card-title">Notícias</h4>
                                <form action="{{ route('produto.noticia.store', $obj->id)}}" method="post"
                                    enctype="multipart/form-data">
                                    {{ csrf_field() }}
                                    <div class="row clearfix">
                                        <div class="col-sm-4">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <select name="noticias[]" id="noticias" class="form-multiselect"
                                                        multiple>
                                                        @if ($noticias)
                                                        @foreach($noticias as $noticia)
                                                        <option value="{{$noticia->id}}">{{$noticia->title}}</option>
                                                        @endforeach
                                                        @endif
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-sm-2">
                                            <button class="btn btn-primary submit-btn btn-block">Adicionar</button>
                                        </div>
                                    </div>

                                </form>


                                <div class="table-responsive" id="listNoticiasProduto">
                                    @if ($obj->noticias)
                                    <table class="table table-striped">
                                        <thead>
                                            <tr>
                                                <th> Id </th>
                                                <th> Título </th>
                                                <th> Ações </th>
                                            </tr>
                                        </thead>
                                        <tbody>

                                            @forelse($obj->noticias as $noticia)
                                            @if($noticia->tipo == 'blog')
                                            <tr>
                                                <td>{{$noticia->id }} </td>
                                                <td>{{$noticia->title}}</td>
                                                <td>
                                                    <form
                                                        action="{{route('produto.noticia.del')}}"
                                                        method="post" class="">
                                                        {{ method_field('DELETE')}}
                                                        {{csrf_field()}}
                                                        <button title="Deletar" class="btn btn-icons btn-inverse-danger noticiaProdutoDel"  data-token="{{ csrf_token() }}" data-produto="{{$obj->id}}" data-noticia="{{ $noticia->id }}">
                                                            <i class="mdi mdi-delete "></i></button>
                                                    </form>
                                                </td>
                                            </tr>
                                            @endif
                                            @empty
                                        </tbody>
                                        <tr>
                                            <td colspan="6">Nenhum registro encontrado.</td>
                                        </tr>
                                        @endforelse
                                    </table>
                                    @endif
                                </div>
                            </div>
                        </div>

                    </div>





                </div>
            </div>
        </div>
    </div>
</div>

<div id="myModal" class="modal hide">
    <div class="modal-content">
        <span class="close">&times;</span>
        <h3>Editar Item</h3>
        <form action="" class="formItem">
            {{ csrf_field() }}
            {{ method_field('PUT') }}
            <input type="hidden" name="modal_id_item" id="modal_id_item">
            <input type="hidden" name="modal_pagina" id="modal_pagina">
            <input type="hidden" name="modal_list" id="modal_list">
            <input type="hidden" name="modal_obj" id="modal_obj">
            <div class="row">
                <div class="col-sm-3">
                    <div class="form-group">
                        <div class="input-group">
                            <select name="modal_icon_item" id="modal_icon_item" class="form-control">
                                @if($icones)
                                    @foreach($icones as $ic)
                                        <option value="{{$ic->id}}">{{$ic->id." - ".$ic->name}}</option>
                                    @endforeach
                                @endif
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-sm-12">
                    <div class="form-group">
                        <div class="input-group">
                            <input type="text" name="modal_titulo_item" id="modal_titulo_item" class="validate form-control"
                                Placeholder="Título" value="" >
                        </div>
                    </div>
                    
                </div>
            </div>
            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <div class="input-group">
                            <input type="text" name="modal_descricao_item" id="modal_descricao_item" class="validate form-control"
                                Placeholder="Descrição" value="" >
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col s6">            
                    <span class="btn btn-primary btn-block close-modal">Cancelar</span>
                </div>
                <div class="col s6">            
                    <button class="btn btn-primary btn-submit btn-block">Salvar</button>
                </div>
            </div>
        </form>
    </div>
</div>

@endsection

@push('plugin-scripts')
@endpush

@push('custom-scripts')
@endpush