<?php

Kirby::plugin('adrienpayet/refresh-cache-button', [
  'areas' => [
    'site' => function () {
      return [
        'buttons'=> [
          'refresh-cache' => function($page) {
            return [
              'component' => 'refresh-cache-button',
              'props' => [
                'pageUri' => $page->uri(),
                'pageStatus' => $page->status()
              ]
            ];
          }
        ]
      ];
    }
  ],
  'routes' => [
    require_once(__DIR__ . '/src/routes/refresh-cache.php')
  ]
]);
