<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
    <tbody>
        <tr>
            <td align="center" class="bodyTitle">
                <p class="lead">Hi {{$user->name}},</p>
            </td>
        </tr>
        <tr>
            <td align="left" class="bodyText" id="content-8" class="text-left">
                <div class="text">

                    <p class="mb-10">You have a  pending request for the approval for the  {!!$feed->ref!!}.</p>
                    <p class="mb-20">Please perform any of the actions below to complete your action:</p>
                    <p class="mb-20">

                    @foreach ($transitions as $transition)
                        @if(empty($transition['form']))

                        <button type="button" class="btn btn-with-icon  btn-{!! @$transition['label']['varient'] !!}"
                            data-action='WORKFLOW'
                            data-method='POST'
                            data-list="#item-list"
                            data-load-to="#app-entry"
                            data-href="{!!$transition['url']!!}">
                            <i class="las la-{!! @$transition['label']['icon'] !!}"></i> {!! @$transition['label']['label'] !!}
                        </button>
                        @else

                        <!-- Modal -->
                        <button type="button" class="btn btn-with-icon btn-{!! $transition['label']['varient'] !!}"
                        data-backdrop="false"  data-toggle="modal" data-target="#{!!$transition['name']!!}Modal">
                        <i class="las la-{!! $transition['label']['icon'] !!}"></i> {!! $transition['label']['label'] !!}
                        </button>
                        
                        @endif
                    @endforeach

                    @foreach ($transitions as $transition)
                        @if(!empty($transition['form']))

                        
                        <div class="modal fade" id="{!!$transition['name']!!}Modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
                            <div class="modal-dialog modal-dialog-centered" role="document">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <h5 class="modal-title" id="{!!$transition['name']!!}ModalLabel">{!! $transition['label']['label'] !!}</h5>
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                        <span aria-hidden="true">&times;</span>
                                        </button>
                                    </div>
                                    <div class="modal-body">
                                        <form id="form-action-{{$transition['name']}}">
                                            <div class="row">
        @foreach($transition['form'] as $key => $field)

        <div class="col-12">
            {!!
            Form::input($key)
            ->apply($field)
            !!}
        </div>

        @endforeach
                                                    
                                            </div>
                                        </form>
                                    </div>
                                    <div class="modal-footer">
                                        <button type="button" class="btn btn-outline" data-dismiss="modal">Close</button>
                                        <button type="button" class="btn btn-with-icon  btn-{!! @$transition['label']['varient'] !!}"
                                            data-action='WORKFLOW'
                                            data-method='POST'
                                            data-form="#form-action-{{$transition['name']}}"
                                            data-list="#item-list"
                                            data-load-to="#app-entry"
                                            data-href="{!!$transition['url']!!}">
                                            <i class="las la-{!! @$transition['label']['icon'] !!}"></i> {!! @$transition['label']['label'] !!}
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        @endif
                    @endforeach

                    </p>
                </div>
            </td>
        </tr>
        <tr>
            <td height="10"></td>
        </tr>
        <tr>
            <td align="left">
                <p class="medium"><span>Regards,<br> The {{config('app.name')}} Team</span></p>
            </td>
        </tr>
        <tr>
            <td height="30"></td>
        </tr>
    </tbody>
</table>