import{jsxs as s,jsx as r}from"react/jsx-runtime";import{S as c}from"./student-feedback-DpTtBUBp.js";import{T as f}from"./tabs-DqFmhKFO.js";import{x as d,y as b,j as v,z as t}from"./ui-components-B24mpb8o.js";import{usePage as h}from"@inertiajs/react";import{useState as w,useEffect as g}from"react";import{Renderer as y}from"richtor";/* empty css                */import x from"./review-CD5k4g_i.js";import N from"./forum-BgQB9lbj.js";import R from"./resource-MgRwg8-G.js";import"./use-lang-Cw_jKJYs.js";import"lucide-react";import"next-themes";import"sonner";import"@radix-ui/react-label";import"class-variance-authority";import"@radix-ui/react-checkbox";import"@radix-ui/react-avatar";import"@radix-ui/react-dropdown-menu";import"@radix-ui/react-scroll-area";import"@radix-ui/react-popover";import"@radix-ui/react-radio-group";import"@radix-ui/react-dialog";import"@radix-ui/react-slot";import"clsx";import"@radix-ui/react-separator";import"@radix-ui/react-tooltip";import"@radix-ui/react-tabs";import"@radix-ui/react-accordion";import"@radix-ui/react-progress";import"@radix-ui/react-select";import"cmdk";import"@radix-ui/react-switch";import"react-day-picker";import"@radix-ui/react-slider";import"embla-carousel-react";import"@radix-ui/react-toggle-group";import"vaul";import"tailwind-merge";import"./delete-modal-DdJyKUdO.js";import"./input-error-BbsDx4-P.js";import"./loading-button-B_LaGOAp.js";import"./table-footer-lUcSaZ5Q.js";import"./route-D0xh7FtZ.js";import"date-fns";import"./review-edit-Ct3RBbSu.js";import"./inertia-FIn3q7f1.js";import"./forum-edit-B-h2aT56.js";import"./forum-reply-ooYAEJXf.js";const yr=()=>{const{props:e}=h(),{translate:p,type:l}=e,{button:o}=p,[a,n]=w(!1);g(()=>{l==="lesson"&&e.watching.resources.length>0&&n(!0)},[e.watching]);const u=[{value:"summery",label:o.summery},{value:"resource",label:"Resource"},{value:"forum",label:o.forum},{value:"review",label:o.review}];return s(f,{defaultValue:"summery",className:"mx-auto grid w-full max-w-5xl overflow-hidden rounded-md pt-1 pb-10",children:[r("div",{className:"overflow-x-auto overflow-y-hidden",children:r(d,{className:"bg-transparent px-0 py-6",children:u.map(({label:i,value:m})=>m==="resource"&&!a?null:r(b,{value:m,className:"border-primary data-[state=active]:!bg-muted data-[state=active]:before:bg-primary relative flex cursor-pointer items-center justify-start gap-3 rounded-none bg-transparent px-8 py-4 text-start !shadow-none before:absolute before:right-0 before:bottom-0 before:left-0 before:h-1 before:rounded-t-xl data-[state=active]:before:content-['.']",children:r("span",{children:i})},m))})}),r(v,{className:"mt-[1px]"}),r(t,{value:"summery",className:"m-0 p-5",children:r(y,{value:e.watching.summary})}),a&&r(t,{value:"resource",className:"m-0 p-5",children:r(R,{})}),r(t,{value:"forum",className:"m-0 p-5",children:r(N,{})}),s(t,{value:"review",className:"m-0 space-y-6 p-5",children:[r(c,{totalReviews:e.totalReviews}),r(x,{})]})]})};export{yr as default};
