<?php 

$id = $result['id'];
$package_id        =  $result['package_id'];
$label_name        =  $result['label_name'];
$label_description =  $result['label_description']; 
$parent_id         =  $result['parent_id'];
$api_name          =  $result['api_name'];
    
$api_url       =  $result['api_url'];
$api_method    =  $result['api_method'];
$api_params    =  trim($result['api_params']);
$api_response  = trim($result['api_response']);
$api_response_desc  =  $result['api_response_desc'];

if($api_params!=''){
$api_params_Arr = json_decode($api_params, true);
}else{
 $api_params_Arr = [];
}

if($api_response_desc!=''){
$api_response_desc = json_decode($api_response_desc, true);
}else{
    $api_response_desc=[];
}
?>
<section class="content" style='min-height: 132px'>
    <div class="box">
        <!-- /.box-header -->
        <div class="box-body table-responsive listing-data">
            <fieldset>
                <legend class="text-bold"><?php echo $api_name?> (API Description)</legend>

                    <div class="panel-body">
                        <?php echo $label_description; ?>		
		   </div>
                
                <div>&nbsp;</div>
 
                <div class="form-group">
                    <label class="control-label col-lg-1"><strong><?php echo $api_method ;?></strong></label>
                    <div class="col-lg-9">
                        <div class="input-group">
                            <input type="text" class="form-control" placeholder="Teal button" value='<?php echo $api_url;?>'>
                            <span class="input-group-btn">
                                <button class="btn bg-teal" type="button">Send</button>
                            </span>
                        </div>
                    </div>
                </div>
            </fieldset>

        </div>
    </div>
</section>
<section class="content">
    <div class="row">
        <div class="col-sm-12">
            <div class="tabbable">


                <div class="tab-content no-border padding-24">
                    <div class="tab-pane fade in active" id="faq-tab-1">
                        <div class="space-8"></div>
                        <div class="panel-group accordion-style1 accordion-style2" id="faq-list-1">


                            <span class="checkbox_error"></span>
                            <div class="panel panel-default">
                                <div class="panel-headingnew"></div>
                                <div id="faq-1-3" class="panel-collapse collapse in" aria-expanded="false" >
                                    <div class="box">
                                        <!-- /.box-header -->
                                        <div class="box-body table-responsive listing-data">
                                        <legend class="text-bold">API Parameters</legend>

                                            <table id="myTable" class="table table-bordered table-striped">
                                                <thead>
                                                    <tr>

                                                        <th width="50%">Key</th>
                                                        <th width="50%">Type</th>
<!--                                                    <th width="45%">Description</th>-->

                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <?php if(count($api_params_Arr)>0) {                                         
                                                    foreach($api_params_Arr as $key => $value) { ?>
                                                    <tr>
                                                        <td><?php echo $key; ?></td>
                                                        <td><?php echo $value; ?></td>
<!--                                                    <td>Search City Name, Get only active city Name</td>-->

                                                    </tr>
                                                    <?php }} ?>



                                                </tbody>

                                            </table>
                                        </div></div></div>
                                
                           <legend class="text-bold">API Response </legend>       
                           <pre class="content-group"><code class="language-javascript"><?php echo $api_response;?></code></pre>
                            
                        <div class="box-body table-responsive listing-data">
                                        <legend class="text-bold">API Resposne Description</legend>

                                            <table id="myTable" class="table table-bordered table-striped">
                                                <thead>
                                                    <tr>

                                                        <th width="50%">Key</th>
                                                        <th width="50%">Description</th>

                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <?php if(count($api_response_desc)>0) {                                         
                                                    foreach($api_response_desc as $key => $value) { ?>
                                                    <tr>
                                                        <td><?php echo $key; ?></td>
                                                        <td><?php echo $value; ?></td>
<!--                                                    <td>Search City Name, Get only active city Name</td>-->

                                                    </tr>
                                                    <?php }} ?>



                                                </tbody>

                                            </table>
                                        </div>


</div>
                            <!-- /.box-body -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<br>

<!-- /.widget-box --> 
</div>
<!-- /.col --> 
</div>

<!-- /.row --> 
<!-- Main row --> 
</section>
