import{jsxs as r,jsx as t}from"react/jsx-runtime";import{B as i}from"./button-BvFBRYHq.js";import{C as d,b as c,c as l,a as u}from"./card-Zg0WOx-j.js";import{A as f}from"./layout-CssQHtfO.js";import{useForm as h,Head as w,router as e}from"@inertiajs/react";import{ArrowLeft as C}from"lucide-react";import"./badge-CFi7bqqA.js";import"clsx";import"react";import"./alert-dialog-xorwy8s8.js";import{NewsForm as N}from"./NewsForm-Br9Mssui.js";import"@radix-ui/react-slot";import"class-variance-authority";import"./utils-CMbmcP35.js";import"tailwind-merge";import"./app-sidebar-header-BX2s-HO_.js";import"@radix-ui/react-collapsible";import"./dropdown-menu-BP80qPHw.js";import"@radix-ui/react-dropdown-menu";import"./app-logo-icon-beRg1XGs.js";import"./fonts-CqawFh47.js";import"@radix-ui/react-dialog";import"@radix-ui/react-tooltip";import"@radix-ui/react-avatar";import"../app.js";/* empty css     */import"axios";import"sonner";import"react-dom/client";import"./toaster-DuLpwsc2.js";import"@radix-ui/react-alert-dialog";import"./label-DMnntKPk.js";import"@radix-ui/react-label";import"./input-qMvM9qch.js";import"./select-DfhewM4T.js";import"@radix-ui/react-select";import"./rich-text-editor-BK3mvong.js";import"@tiptap/react";import"@tiptap/starter-kit";import"@tiptap/extension-text-align";import"@tiptap/extension-link";import"@tiptap/extension-color";import"@tiptap/extension-text-style";import"@tiptap/extension-highlight";import"@tiptap/extension-table";import"@tiptap/extension-table-row";import"@tiptap/extension-table-cell";import"@tiptap/extension-table-header";import"@tiptap/core";import"./separator-BDLxzoJ8.js";import"@radix-ui/react-separator";import"./popover-SprfKcRl.js";import"@radix-ui/react-popover";import"./dialog-BfGkTFdF.js";import"./constants-B4vUcFwO.js";const b=[{title:"Admin",href:"/admin"},{title:"News",href:"/admin/news"},{title:"Create",href:"/admin/news/create"}];function xt(){const{data:m,setData:p,post:a,processing:o,errors:n}=h({title:"",category:"patch",image:null,content:"",is_active:!0,show_as_popup:!1,popup_delay:1e3,popup_frequency:"once"});return r(f,{breadcrumbs:b,children:[t(w,{title:"Create News"}),t("div",{className:"container py-6",children:r(d,{children:[t(c,{children:r("div",{className:"flex items-center justify-between",children:[t(l,{children:"Create News"}),r(i,{variant:"outline",onClick:()=>e.visit(route("admin.news.index")),children:[t(C,{className:"h-4 w-4"}),t("span",{className:"ml-2 hidden md:inline",children:"Back"})]})]})}),t(u,{children:r("form",{onSubmit:s=>{s.preventDefault(),a(route("admin.news.store"),{forceFormData:!0,onSuccess:()=>{e.visit(route("admin.news.index"))}})},className:"space-y-6",children:[t(N,{data:m,setData:p,errors:n}),r("div",{className:"flex justify-end gap-4 border-t pt-4",children:[t(i,{type:"button",variant:"outline",onClick:()=>e.visit(route("admin.news.index")),children:"Cancel"}),t(i,{type:"submit",disabled:o,children:o?"Creating...":"Create News"})]})]})})]})})]})}export{xt as default};
