@extends('back-end.master.app')
@section('title', 'customer')
@section('pageCSS')
@endsection
@section('body')
    <main class="app-content">
        <section class=" gradient-custom-2">
            <div class="">
                <div class="row d-flex justify-content-center align-items-center h-100">
                    <div class="col-md-12 col-xl-12">
                        <div class="card mask-custom">
                            <div class="card-header">
                                <div class="row">
                                    <div class="col-md-8">
                                        <h4>د مربوط غزل تفصیل</h4>
                                    </div>
                                    <div class="col-md-4">
                                        <div class="" style="float: right">
                                            <a href="{{ route('poets.index') }}"
                                                class="btn btn-primary btn-sm btn-rounded mt-5" style="float: right">back
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="card-body p-4 ">
                                <div class="card">
                                    <div class="card-body">
                                        <div class="row">
                                            <table class="table">
                                                <thead>
                                                    <tr>
                                                        <th>Poet</th>
                                                        <td>{{ $data->poet->name }}</td>
                                                    </tr>
                                                    <tr>
                                                        <th>Category</th>
                                                        <td>{{ $data->category->title_ps }}</td>
                                                    </tr>
                                                    <tr>
                                                        <th>Sub Category</th>
                                                        <td>{{ $data->sub_category->title_ps }}</td>
                                                    </tr>
                                                    <tr>
                                                        <th>Centry</th>
                                                        <td>{{ $data->poet->centry->title_ps }}</td>
                                                    </tr>
                                                    <tr>
                                                        <th>Database Date</th>
                                                        <td>{{ $data->date }}</td>
                                                    </tr>
                                                </thead>
                                            </table>
                                        </div>
                                        <div class="row mt-3">
                                            <div class="card">
                                                <div class="card-body">
                                                    <p class="lead" dir="rtl" id="text">
                                                        {!! $data->body !!}
                                                    </p>
                                                    <button type="button" id="copy">Copy</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </section>
    </main>
@endsection


@section('pageJs')
    <script type="text/javascript">
        $(".app-menu").removeClass("active");
        $("#nav_stocki").addClass("active");
        $("#stocki").addClass("is-expanded");
        $("#posts").addClass("active");
        $(document).ready(function() {
            $("#copy").click(function() {
                $("#text").copy();

            });
        });
    </script>
@endsection
