<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class AnnouncementController extends Controller
{
    public function index()
    {
        // Placeholder: show announcement dashboard/listing
        return view('announcements.index');
    }

    public function create()
    {
        return view('announcements.create');
    }

    public function store(Request $request)
    {
        // Placeholder implementation
        return redirect()->back()->with('success', 'Announcement saved (stub).');
    }

    public function show($id)
    {
        return view('announcements.show', ['announcementId' => $id]);
    }

    public function edit($id)
    {
        return view('announcements.edit', ['announcementId' => $id]);
    }

    public function update(Request $request, $id)
    {
        return redirect()->back()->with('success', 'Announcement updated (stub).');
    }

    public function destroy($id)
    {
        return redirect()->back()->with('success', 'Announcement deleted (stub).');
    }

    public function pin($id)
    {
        return redirect()->back()->with('success', 'Announcement pinned (stub).');
    }

    public function unpin($id)
    {
        return redirect()->back()->with('success', 'Announcement unpinned (stub).');
    }

    public function acknowledge($id)
    {
        return redirect()->back()->with('success', 'Announcement acknowledged (stub).');
    }

    public function pinned()
    {
        return view('announcements.pinned');
    }
}
