@extends('admin.main')
@section('content')
@php
use Illuminate\Support\Facades\Crypt;
@endphp

<style>
    /* #showData table th,
    #showData table td {
        border: 1px solid #40475863;
    } */

    /* #showData .table td,
    #showData .table th {
        padding: 4px;
    } */

    #showData .table td .deleteRow {
        cursor: pointer;
    }
    #ncmxzkjshf{
        height: 96vh;
    }

    .table-responsive::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
background-color: #F5F5F5;
}

.table-responsive::-webkit-scrollbar
{
width: 6px;
height: 6px;
background-color: #F5F5F5;
}

.table-responsive::-webkit-scrollbar-thumb
{
background-color: #000000;
}
.instractions{
position: fixed;
top: 30px;
left: 50%;
background-color: #000;
color: #fff;
padding: 15px;
border-radius: 10px;
font-weight: 500;
}
sup{
top: -20px;
font-size: 13px;
background: #223d7a;
padding: 3px 5px;
border-radius: 3px;
color: #fff;
}
.typewriter {
  --blue: #4771d0;
  --blue-dark: #223d7a;
  --key: #fff;
  --paper: #EEF0FD;
  --text: #D3D4EC;
  --tool: #FBC56C;
  --duration: 3s;
  position: relative;
  -webkit-animation: bounce05 var(--duration) linear infinite;
  animation: bounce05 var(--duration) linear infinite;
  position: absolute;
top: 50%;
left: 55%;
}

.typewriter .slide {
  width: 92px;
  height: 20px;
  border-radius: 3px;
  margin-left: 14px;
  transform: translateX(14px);
  background: linear-gradient(var(--blue), var(--blue-dark));
  -webkit-animation: slide05 var(--duration) ease infinite;
  animation: slide05 var(--duration) ease infinite;
}

.typewriter .slide:before, .typewriter .slide:after,
.typewriter .slide i:before {
  content: "";
  position: absolute;
  background: var(--tool);
}

.typewriter .slide:before {
  width: 2px;
  height: 8px;
  top: 6px;
  left: 100%;
}

.typewriter .slide:after {
  left: 94px;
  top: 3px;
  height: 14px;
  width: 6px;
  border-radius: 3px;
}

.typewriter .slide i {
  display: block;
  position: absolute;
  right: 100%;
  width: 6px;
  height: 4px;
  top: 4px;
  background: var(--tool);
}

.typewriter .slide i:before {
  right: 100%;
  top: -2px;
  width: 4px;
  border-radius: 2px;
  height: 14px;
}

.typewriter .paper {
  position: absolute;
  left: 24px;
  top: -26px;
  width: 40px;
  height: 46px;
  border-radius: 5px;
  background: var(--paper);
  transform: translateY(46px);
  -webkit-animation: paper05 var(--duration) linear infinite;
  animation: paper05 var(--duration) linear infinite;
}

.typewriter .paper:before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 7px;
  border-radius: 2px;
  height: 4px;
  transform: scaleY(0.8);
  background: var(--text);
  box-shadow: 0 12px 0 var(--text), 0 24px 0 var(--text), 0 36px 0 var(--text);
}

.typewriter .keyboard {
  width: 120px;
  height: 56px;
  margin-top: -10px;
  z-index: 1;
  position: relative;
}

.typewriter .keyboard:before, .typewriter .keyboard:after {
  content: "";
  position: absolute;
}

.typewriter .keyboard:before {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  transform: perspective(10px) rotateX(2deg);
  transform-origin: 50% 100%;
}

.typewriter .keyboard:after {
  left: 2px;
  top: 25px;
  width: 11px;
  height: 4px;
  border-radius: 2px;
  box-shadow: 15px 0 0 var(--key), 30px 0 0 var(--key), 45px 0 0 var(--key), 60px 0 0 var(--key), 75px 0 0 var(--key), 90px 0 0 var(--key), 22px 10px 0 var(--key), 37px 10px 0 var(--key), 52px 10px 0 var(--key), 60px 10px 0 var(--key), 68px 10px 0 var(--key), 83px 10px 0 var(--key);
  -webkit-animation: keyboard05 var(--duration) linear infinite;
  animation: keyboard05 var(--duration) linear infinite;
}

@keyframes bounce05 {
  85%, 92%, 100% {
    transform: translateY(0);
  }

  89% {
    transform: translateY(-4px);
  }

  95% {
    transform: translateY(2px);
  }
}

@keyframes slide05 {
  5% {
    transform: translateX(14px);
  }

  15%, 30% {
    transform: translateX(6px);
  }

  40%, 55% {
    transform: translateX(0);
  }

  65%, 70% {
    transform: translateX(-4px);
  }

  80%, 89% {
    transform: translateX(-12px);
  }

  100% {
    transform: translateX(14px);
  }
}

@keyframes paper05 {
  5% {
    transform: translateY(46px);
  }

  20%, 30% {
    transform: translateY(34px);
  }

  40%, 55% {
    transform: translateY(22px);
  }

  65%, 70% {
    transform: translateY(10px);
  }

  80%, 85% {
    transform: translateY(0);
  }

  92%, 100% {
    transform: translateY(46px);
  }
}

@keyframes keyboard05 {
  5%, 12%, 21%, 30%, 39%, 48%, 57%, 66%, 75%, 84% {
    box-shadow: 15px 0 0 var(--key), 30px 0 0 var(--key), 45px 0 0 var(--key), 60px 0 0 var(--key), 75px 0 0 var(--key), 90px 0 0 var(--key), 22px 10px 0 var(--key), 37px 10px 0 var(--key), 52px 10px 0 var(--key), 60px 10px 0 var(--key), 68px 10px 0 var(--key), 83px 10px 0 var(--key);
  }

  9% {
    box-shadow: 15px 2px 0 var(--key), 30px 0 0 var(--key), 45px 0 0 var(--key), 60px 0 0 var(--key), 75px 0 0 var(--key), 90px 0 0 var(--key), 22px 10px 0 var(--key), 37px 10px 0 var(--key), 52px 10px 0 var(--key), 60px 10px 0 var(--key), 68px 10px 0 var(--key), 83px 10px 0 var(--key);
  }

  18% {
    box-shadow: 15px 0 0 var(--key), 30px 0 0 var(--key), 45px 0 0 var(--key), 60px 2px 0 var(--key), 75px 0 0 var(--key), 90px 0 0 var(--key), 22px 10px 0 var(--key), 37px 10px 0 var(--key), 52px 10px 0 var(--key), 60px 10px 0 var(--key), 68px 10px 0 var(--key), 83px 10px 0 var(--key);
  }

  27% {
    box-shadow: 15px 0 0 var(--key), 30px 0 0 var(--key), 45px 0 0 var(--key), 60px 0 0 var(--key), 75px 0 0 var(--key), 90px 0 0 var(--key), 22px 12px 0 var(--key), 37px 10px 0 var(--key), 52px 10px 0 var(--key), 60px 10px 0 var(--key), 68px 10px 0 var(--key), 83px 10px 0 var(--key);
  }

  36% {
    box-shadow: 15px 0 0 var(--key), 30px 0 0 var(--key), 45px 0 0 var(--key), 60px 0 0 var(--key), 75px 0 0 var(--key), 90px 0 0 var(--key), 22px 10px 0 var(--key), 37px 10px 0 var(--key), 52px 12px 0 var(--key), 60px 12px 0 var(--key), 68px 12px 0 var(--key), 83px 10px 0 var(--key);
  }

  45% {
    box-shadow: 15px 0 0 var(--key), 30px 0 0 var(--key), 45px 0 0 var(--key), 60px 0 0 var(--key), 75px 0 0 var(--key), 90px 2px 0 var(--key), 22px 10px 0 var(--key), 37px 10px 0 var(--key), 52px 10px 0 var(--key), 60px 10px 0 var(--key), 68px 10px 0 var(--key), 83px 10px 0 var(--key);
  }

  54% {
    box-shadow: 15px 0 0 var(--key), 30px 2px 0 var(--key), 45px 0 0 var(--key), 60px 0 0 var(--key), 75px 0 0 var(--key), 90px 0 0 var(--key), 22px 10px 0 var(--key), 37px 10px 0 var(--key), 52px 10px 0 var(--key), 60px 10px 0 var(--key), 68px 10px 0 var(--key), 83px 10px 0 var(--key);
  }

  63% {
    box-shadow: 15px 0 0 var(--key), 30px 0 0 var(--key), 45px 0 0 var(--key), 60px 0 0 var(--key), 75px 0 0 var(--key), 90px 0 0 var(--key), 22px 10px 0 var(--key), 37px 10px 0 var(--key), 52px 10px 0 var(--key), 60px 10px 0 var(--key), 68px 10px 0 var(--key), 83px 12px 0 var(--key);
  }

  72% {
    box-shadow: 15px 0 0 var(--key), 30px 0 0 var(--key), 45px 2px 0 var(--key), 60px 0 0 var(--key), 75px 0 0 var(--key), 90px 0 0 var(--key), 22px 10px 0 var(--key), 37px 10px 0 var(--key), 52px 10px 0 var(--key), 60px 10px 0 var(--key), 68px 10px 0 var(--key), 83px 10px 0 var(--key);
  }

  81% {
    box-shadow: 15px 0 0 var(--key), 30px 0 0 var(--key), 45px 0 0 var(--key), 60px 0 0 var(--key), 75px 0 0 var(--key), 90px 0 0 var(--key), 22px 10px 0 var(--key), 37px 12px 0 var(--key), 52px 10px 0 var(--key), 60px 10px 0 var(--key), 68px 10px 0 var(--key), 83px 10px 0 var(--key);
  }
}
</style>
    <div class="row " id="ncmxzkjshf">
        <div class="col-12 h-100">
            <a href="{{url()->previous()}}" class="rounded-pill mb-2 p-0 px-2 py-1 btn btn-secondary text-dark btn-sm me-2"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="20" height="20" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><path fill="#fff" d="M8.528 7.533a.75.75 0 1 0-1.056-1.066l-1.795 1.78c-.676.669-1.228 1.217-1.62 1.704-.407.508-.702 1.023-.781 1.64a3.228 3.228 0 0 0 0 .817c.079.618.374 1.133.781 1.64.392.488.944 1.036 1.62 1.706l1.795 1.779a.75.75 0 1 0 1.056-1.066L6.765 14.72c-.715-.71-1.206-1.197-1.538-1.61a3.524 3.524 0 0 1-.258-.36H20a.75.75 0 0 0 0-1.5H4.97c.064-.107.149-.225.257-.36.332-.413.822-.9 1.538-1.61z" data-original="#fff" class=""></path></g></svg> Back</a>
            <a href="{{url()->current()}}" class="rounded-pill mb-2 p-0 px-2 py-1 btn btn-secondary text-dark btn-sm me-2"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="20" height="20" x="0" y="0" viewBox="0 0 24 24" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><path d="M19.602 12.635a.99.99 0 0 0-1.134.844 6.402 6.402 0 0 1-1.83 3.618 6.506 6.506 0 0 1-9.192 0 6.507 6.507 0 0 1 0-9.192 6.414 6.414 0 0 1 3.503-1.8 6.187 6.187 0 0 1 1.848-.055 6.414 6.414 0 0 1 2.466.828l-1.302.223a1 1 0 1 0 .338 1.971l3.49-.596a1.002 1.002 0 0 0 .816-1.155l-.597-3.49a1 1 0 1 0-1.97.338l.156.919a8.423 8.423 0 0 0-3.17-1.025 8.102 8.102 0 0 0-2.428.074 8.379 8.379 0 0 0-4.564 2.354c-3.313 3.314-3.313 8.705 0 12.02a8.471 8.471 0 0 0 6.01 2.485 8.471 8.471 0 0 0 6.01-2.485 8.39 8.39 0 0 0 2.394-4.741 1 1 0 0 0-.843-1.135z" fill="#fff" data-original="#fff" class=""></path></g></svg> Refresh</a>
            <div class="bg-yellow-100 border-0 shadow h-100">
                <div class="card-header">
                    <div class="row align-items-center">
                        <div class="col">
                            @php
                                if(isset($role->role)){
                                    $role = $role->role;
                                }else{
                                    $role = 'Admin';
                                }
                            @endphp
                            <h2 class="fs-2 fw-bold mb-0">{{$name}} <sup>{{$role}}</sup> </h2>
                            <pre id="content" style="white-space: pre-wrap;"></pre>
                        </div>
                        <div class="col text-end">

<style>
    .fontSize{
        background: white;
    padding: 6px 9px;
    border-radius: 49px;
    }
    .plus,.minus{
        cursor: pointer;
    }
</style>
                            <span class="fontSize me-3">
                                <svg class="minus" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="15" height="15" x="0" y="0" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><path d="m256 512c-141.164062 0-256-114.835938-256-256s114.835938-256 256-256 256 114.835938 256 256-114.835938 256-256 256zm0-480c-123.519531 0-224 100.480469-224 224s100.480469 224 224 224 224-100.480469 224-224-100.480469-224-224-224zm0 0" fill="#000000" data-original="#000000"></path><path d="m368 272h-224c-8.832031 0-16-7.167969-16-16s7.167969-16 16-16h224c8.832031 0 16 7.167969 16 16s-7.167969 16-16 16zm0 0" fill="#000000" data-original="#000000"></path></g></svg>                            
                                <span class="px-2"><span class="fontSizeno">13</span><span class="fontSizepx">px</span></span>
                                <svg class="plus" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" width="15" height="15" x="0" y="0" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g><path d="m256 .001c-141.158 0-255.999 114.841-255.999 255.999s114.841 255.999 255.999 255.999 255.999-114.84 255.999-255.999-114.841-255.999-255.999-255.999zm0 479.998c-123.513 0-223.999-100.486-223.999-223.999s100.486-223.999 223.999-223.999 223.999 100.485 223.999 223.999c0 123.513-100.486 223.999-223.999 223.999zm142-223.999c0 8.837-7.164 16-16 16h-110v110c0 8.837-7.164 16-16 16s-16-7.163-16-16v-110h-110c-8.836 0-16-7.163-16-16s7.164-16 16-16h110v-110c0-8.837 7.164-16 16-16s16 7.163 16 16v110h110c8.836 0 16 7.164 16 16z" fill="#000000" data-original="#000000" class=""></path></g></svg>
                            </span>
                            @if($role == 'insert' || $role == 'editor' || $role == 'Admin')
                            <button class="btn btn-secondary text-dark btn-sm me-2" onclick="style_insert()">Insert style</button>
                            @endif
                        </div>
                    </div>
                </div>
                <div class="card-body p-4">
                    <div class="row justify-content-between" >
                            <div class="col-md-3">
                                    <select id="objectCategories" class="form-control form-control-sm shadow-none"></select>

                                </div>
                                <div class="col-md-3">
                                    <input id="myInput" class="form-control form-control-sm shadow-none" type="search" placeholder="Search..">
                                </div>
                            </div>
                    <div class="table-responsive" style="height: 73vh;">
                        <div class="typewriter">
    <div class="slide"><i></i></div>
    <div class="paper"></div>
    <div class="keyboard"></div>
</div>
                        <div id="showData">
                            
                            <table class="table m-0 table-striped" style="color: #000">
                                <thead>
                                    <tr>
                                    </tr>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <span class="instractions d-none">Press Tab for Saveing</span>
    @php
    
    @endphp
    <script>
        usrstctions = "{{$role}}";
        @if(session('userid') == 1)
        const sheetId = "{{$id }}";
        @else
        const sheetId = "{{ Crypt::decryptString($id) }}";
        @endif
        
    </script>
    <script>
        
    </script>
@endsection
