1import{ac as P,c1 as V,r as x,cY as g,j as e,B as i,cZ as c,c8 as h,cQ as n,c_ as M,c$ as T,p as I,e as B}from"./index-DbRva7cN.js";import{C as _,a as R,b as E,c as O}from"./card-D1vH_X3k.js";import{S as v,a as w,b as y,c as C,d as S}from"./select-D_w7bw64.js";import{S as D,G as L}from"./slider-Bmp-EFGz.js";import{V as z}from"./volume-x-BG6tINeH.js";import{V as r}from"./volume-2-BgS6Lrp4.js";import{C as Y}from"./circle-play-B9LXmU-P.js";import{M as q}from"./message-circle-BdhWtxDF.js";import{C as F}from"./clipboard-list-DBp9V6GS.js";import{C as G}from"./calendar-days-KtvRdkI8.js";import{M as H}from"./messages-square-CJ4c6iWP.js";import{B as U}from"./BackButton-CzcBEVc0.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const $=P("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]),Q=[{type:"chat",label:"Chat Notifications",description:"New messages in support chat",icon:e.jsx(q,{className:"h-4 w-4"})},{type:"training",label:"Training Notifications",description:"New training content available",icon:e.jsx(L,{className:"h-4 w-4"})},{type:"discussion",label:"Discussion Notifications",description:"New posts in community",icon:e.jsx(I,{className:"h-4 w-4"})}],X=[{type:"crm_tasks",label:"CRM Tasks",description:"Task assignments and reminders",icon:e.jsx(F,{className:"h-4 w-4"})},{type:"crm_appointments",label:"CRM Appointments",description:"Appointment bookings and reminders",icon:e.jsx(G,{className:"h-4 w-4"})},{type:"crm_conversations",label:"CRM Conversations",description:"New CRM conversation messages",icon:e.jsx(H,{className:"h-4 w-4"})}],Z=({onClose:u})=>{const{preferences:l,updatePreference:b}=V(),[p,N]=x.useState(!1),[m,j]=x.useState(g());x.useEffect(()=>{j(g())},[]);const k=s=>{const t=s[0];j(t),M(t),n("quick-ding")},A=async()=>{N(!0),await T(),N(!1)},f=(s,t)=>{b(s,t),n(t),B.success(`${s.charAt(0).toUpperCase()+s.slice(1)} sound updated!`)};return e.jsxs(_,{className:"w-full max-w-2xl mx-auto",children:[e.jsx(R,{className:"pb-3",children:e.jsxs(E,{className:"flex items-center gap-2 text-lg",children:[e.jsx($,{className:"h-5 w-5"}),"Notification Sound Settings"]})}),e.jsxs(O,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Master Volume"}),e.jsxs("div",{className:"flex items-center gap-4 p-3 rounded-lg bg-muted/50 border",children:[m===0?e.jsx(z,{className:"h-5 w-5 text-muted-foreground shrink-0"}):e.jsx(r,{className:"h-5 w-5 text-primary shrink-0"}),e.jsx(D,{value:[m],onValueChange:k,max:100,min:0,step:5,className:"flex-1"}),e.jsxs("span",{className:"text-sm font-medium w-12 text-right",children:[m,"%"]})]})]}),e.jsx("div",{className:"flex justify-center",children:e.jsxs(i,{onClick:A,disabled:p,variant:"outline",className:"gap-2",children:[e.jsx(Y,{className:"h-4 w-4"}),p?"Playing All 15 Sounds...":"Play All Sounds"]})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h3",{className:"text-sm font-medium text-muted-foreground",children:["Available Sounds (",c.length,")"]}),e.jsx(h,{className:"h-[200px] rounded-md border p-2",children:e.jsx("div",{className:"grid grid-cols-3 gap-2",children:c.map(s=>e.jsxs(i,{variant:"outline",size:"sm",onClick:()=>n(s.id),className:"justify-start gap-2 h-auto py-2 px-3 text-left",title:s.description,children:[e.jsx(r,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"text-xs truncate",children:s.name})]},s.id))})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Assign Sounds to Notifications"}),Q.map(({type:s,label:t,description:d,icon:o})=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-muted/50 border gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"p-2 rounded-full bg-primary/10 shrink-0",children:o}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"font-medium text-sm truncate",children:t}),e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:d})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsxs(v,{value:l[s],onValueChange:a=>f(s,a),children:[e.jsx(w,{className:"w-[140px] h-8 text-xs",children:e.jsx(y,{})}),e.jsx(C,{children:e.jsx(h,{className:"h-[200px]",children:c.map(a=>e.jsx(S,{value:a.id,className:"text-xs",children:a.name},a.id))})})]}),e.jsx(i,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:()=>n(l[s]),title:"Preview current sound",children:e.jsx(r,{className:"h-3.5 w-3.5"})})]})]},s))]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"CRM Notifications"}),X.map(({type:s,label:t,description:d,icon:o})=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-muted/50 border gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{className:"p-2 rounded-full bg-primary/10 shrink-0",children:o}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"font-medium text-sm truncate",children:t}),e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:d})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsxs(v,{value:l[s],onValueChange:a=>f(s,a),children:[e.jsx(w,{className:"w-[140px] h-8 text-xs",children:e.jsx(y,{})}),e.jsx(C,{children:e.jsx(h,{className:"h-[200px]",children:c.map(a=>e.jsx(S,{value:a.id,className:"text-xs",children:a.name},a.id))})})]}),e.jsx(i,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:()=>n(l[s]),title:"Preview current sound",children:e.jsx(r,{className:"h-3.5 w-3.5"})})]})]},s))]}),u&&e.jsx(i,{onClick:u,className:"w-full mt-4",variant:"default",children:"Done"})]})]})},me=()=>e.jsx("div",{className:"min-h-screen bg-background flex flex-col items-center justify-center p-4",children:e.jsxs("div",{className:"w-full max-w-md
6space-y-4",children:[e.jsx(U,{fallbackPath:"/community",className:"mb-4"}),e.jsx(Z,{}),e.jsx("p",{className:"text-center text-sm text-muted-foreground mt-4",children:'Click "Play" to test each notification sound'})]})});export{me as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.