import{j as e}from"./jsx-runtime.D_zvdyIk.js";import{a as n}from"./design-tokens.Dn6fllXW.js";import{c as l}from"./utils.BZbvJs_N.js";import{u as c}from"./index.RTTH55m1.js";import{d as m,t as p}from"./modal.CmyA2O2l.js";import{m as o}from"./proxy.D9st1TsE.js";import"./index.BIRwh3HZ.js";import"./_commonjsHelpers.CqkleIqs.js";import"./index.BHh4vvK5.js";import"./index.3whys8t3.js";const r={closed:{rotate:0,y:0,opacity:1,transition:n.spring.menu},opened:t=>{switch(t){case 1:return{rotate:45,y:6,opacity:1,transition:n.spring.menu};case 2:return{rotate:0,y:0,opacity:0,transition:n.spring.menu};case 3:return{rotate:-45,y:-6,opacity:1,transition:n.spring.menu};default:return{rotate:0,y:0,opacity:1,transition:n.spring.menu}}}},k=({className:t,id:s})=>{const i=c(m),a=()=>{p()};return e.jsx("div",{className:l("flex-center",t),id:s,style:{viewTransitionName:"home-menu-icon"},children:e.jsx("button",{className:"size-10 flex-center cursor-pointer select-none rounded-full bg-white/20 text-shoka",onClick:a,"aria-label":i?"关闭菜单":"打开菜单","aria-expanded":i,type:"button",style:{viewTransitionName:"menu-icon"},children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":i?"关闭菜单":"打开菜单",children:[e.jsx(o.g,{variants:r,initial:!1,animate:i?"opened":"closed",custom:1,style:{originX:.5,originY:.25},children:e.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"})}),e.jsx(o.g,{variants:r,initial:!1,animate:i?"opened":"closed",custom:2,style:{originX:.5,originY:.5},children:e.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"})}),e.jsx(o.g,{variants:r,initial:!1,animate:i?"opened":"closed",custom:3,style:{originX:.5,originY:.75},children:e.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})})]})})})};export{k as MenuIcon};
