var x=Object.defineProperty,y=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;var p=(r,t,e)=>t in r?x(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,d=(r,t)=>{for(var e in t||(t={}))c.call(t,e)&&p(r,e,t[e]);if(s)for(var e of s(t))l.call(t,e)&&p(r,e,t[e]);return r},h=(r,t)=>y(r,D(t));var u=(r,t)=>{var e={};for(var o in r)c.call(r,o)&&t.indexOf(o)<0&&(e[o]=r[o]);if(r!=null&&s)for(var o of s(r))t.indexOf(o)<0&&l.call(r,o)&&(e[o]=r[o]);return e};import{jsx as i,jsxs as m}from"react/jsx-runtime";import{U as E,V as H,B as T,W as j,X as a}from"./ui-components-B24mpb8o.js";import{useEditor as v}from"./use-editor-D8T8wKX0.js";import{Sun as N,Moon as g,Monitor as w}from"lucide-react";import"next-themes";import"sonner";import"react";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"./editor-provider-CwMLJaUa.js";import"uuid";const lr=e=>{var o=e,{className:r}=o,t=u(o,["className"]);const{editor:f,dispatch:C}=v(),M=()=>{switch(f.editor.theme){case"dark":return i(g,{className:"h-5 w-5"});case"light":return i(N,{className:"h-5 w-5"});default:return i(w,{className:"h-5 w-5"})}},n=k=>{C({type:"CHANGE_THEME",payload:{theme:k}})};return i("div",h(d({className:r},t),{children:m(E,{children:[i(H,{asChild:!0,children:m(T,{variant:"outline",size:"icon",children:[M(),i("span",{className:"sr-only",children:"Toggle theme"})]})}),m(j,{align:"center",children:[i(a,{onClick:()=>n("light"),className:"cursor-pointer",children:m("span",{className:"flex items-center gap-2",children:[i(N,{className:"h-5 w-5"}),"Light"]})}),i(a,{onClick:()=>n("dark"),className:"cursor-pointer",children:m("span",{className:"flex items-center gap-2",children:[i(g,{className:"h-5 w-5"}),"Dark"]})}),i(a,{onClick:()=>n("system"),className:"cursor-pointer",children:m("span",{className:"flex items-center gap-2",children:[i(w,{className:"h-5 w-5"}),"System"]})})]})]})}))};export{lr as default};
