<?php

use Dcat\Admin\Admin;
use Dcat\Admin\Grid;
use Dcat\Admin\Form;
use Dcat\Admin\Grid\Filter;
use Dcat\Admin\Show;

/**
 * Dcat-admin - admin builder based on Laravel.
 * @author jqh <https://github.com/jqhph>
 *
 * Bootstraper for Admin.
 *
 * Here you can remove builtin form field:
 *
 * extend custom field:
 * Dcat\Admin\Form::extend('php', PHPEditor::class);
 * Dcat\Admin\Grid\Column::extend('php', PHPEditor::class);
 * Dcat\Admin\Grid\Filter::extend('php', PHPEditor::class);
 *
 * Or require js and css assets:
 * Admin::css('/packages/prettydocs/css/styles.css');
 * Admin::js('/packages/prettydocs/js/main.js');
 *
 */
Dcat\Admin\Color::extend('deep_blue', [
  'primary'        => '#000F9F',
  'primary-darker' => '#000F9F',
  'link'           => '#000F9F',
]);

Form::resolving(function (Form $form) {
  $form->footer(function ($footer) {
      // 去掉`查看`checkbox
      $footer->disableViewCheck();
      // 去掉`继续编辑`checkbox
      $footer->disableEditingCheck();
      // 去掉`继续创建`checkbox
      $footer->disableCreatingCheck();
  });
});