@extends('layouts.appadmin')

@section('content')
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
  <div class="container-fluid">
    <h2 class="mb-4">Modifier les informations de la société</h2>
    <form action="{{ route('infos.update', $info->id) }}" method="POST" enctype="multipart/form-data">
        @csrf
        <div class="row">
            <div class="col-md-6">
                <div class="mb-3">
                    <label class="form-label">Nom:</label>
                    <input type="text" name="nom" class="form-control" value="{{ $info->nom }}" required>
                </div>
                <div class="mb-3">
                    <label class="form-label">Téléphone:</label>
                    <input type="text" name="tele" class="form-control" value="{{ $info->tele }}">
                </div>
                <div class="mb-3">
                    <label class="form-label">Adresse:</label>
                    <input type="text" name="adress" class="form-control" value="{{ $info->adress }}">
                </div>
            </div>
            <div class="col-md-6">
                <div class="mb-3">
                    <label class="form-label">ICE:</label>
                    <input type="text" name="ice" class="form-control" value="{{ $info->ice }}">
                </div>
                <div class="mb-3">
                    <label class="form-label">RIB:</label>
                    <input type="text" name="rib" class="form-control" value="{{ $info->rib }}">
                </div>
                <div class="mb-3">
                    <label class="form-label">Logo actuel:</label><br>
                    @if ($info->logo)
                        <img src="{{ asset($info->logo) }}" alt="Logo" width="100">
                    @endif
                </div>
                <div class="mb-3">
                    <label class="form-label">Nouveau Logo:</label>
                    <input type="file" name="logo" class="form-control">
                </div>
            </div>
        </div>
        <button type="submit" class="btn btn-success">Enregistrer</button>
    </form>
</div>
@endsection
