@extends('layouts.layouts_index.main')

@section('title', 'EndoINDEX')
@section('style')
    <meta name="csrf-token" content="{{ csrf_token() }}" />
    <link href="{{ url('public/css/superadmin/index.css') }}" rel="stylesheet" type="text/css" />
    <link href="{{url("public/sample/assets/plugins/custom/jstree/jstree.bundle.css")}}" rel="stylesheet" type="text/css" />
    <style>

    </style>
@endsection
@section('modal')


@endsection
@section('content')
@php
$swicth = 'EndoCAPTURE/superadmin/component/switch';
$textbox = 'EndoCAPTURE/superadmin/component/textbox';
@endphp
<div class="col-12">
    <div class="card card-custom">
        <div class="card-header ribbon ribbon-clip ribbon-right">
            <div class="ribbon-target" style="">
             <span class="ribbon-inner bg-description" data-toggle="modal" data-target="#modal_description"></span><i class="fab fa-medapps"></i>
            </div>
            <div class="col-12 mb-3">
                <h2 style="text-align: center;">การเปิดปิดการใช้งานระบบ API</h2>
            </div>
            @include('EndoCAPTURE.superadmin.component.menutopbar')

        </div>
        <div class="card-body">
            <div class="row m-0">
                @component($textbox, ['type' => 'hospital', 'name' => 'Hospital NAME', 'id' => 'hospital_name'])
                @endcomponent
            </div>
            <div class="row m-0">
                @component($textbox, ['type' => 'hospital', 'name' => 'Hospital Address', 'id' => 'hospital_address'])
                @endcomponent
            </div>


@endsection
@section('script')
<script>
     $(".config_type").focusout(function() {
            var value = $(this).val();
            console.log('a');
            var id = $(this).attr('id');
            var config_type = $(this).attr('config_type');
            $.post("{{ url('superadmin') }}", {
                event: "config_type",
                config_type: config_type,
                id: id,
                value: value,
            }, function(data, status) {});
        });

</script>



@endsection
