import{l as e}from"./vendor-react-Dzc9WstK.js";import{t}from"./arrow-left-BHEa0Gjf.js";import{t as n}from"./building-2-B6TkTZDB.js";import{t as r}from"./image-n9lAl4fW.js";import{t as i}from"./pencil-BpO9_j3g.js";import{t as a}from"./sparkles-CSIlX8OX.js";import{t as o}from"./trash-2-D01WN1hB.js";import{_ as s}from"./vendor-flow-IzlrcDx6.js";import{En as c,rn as l}from"./index-HkVQGc9M.js";import{t as u}from"./Toggle-2QSMSFck.js";import{t as d}from"./PageHeader-D7FASfZI.js";var f=s();function p({title:n,description:r,children:i}){return(0,f.jsxs)(`div`,{className:`w-full`,children:[(0,f.jsxs)(e,{to:`/admin/masters`,className:`inline-flex items-center gap-1.5 mb-5 text-[12.5px] font-medium text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] transition-colors`,children:[(0,f.jsx)(t,{className:`w-3.5 h-3.5`}),`Master Management`]}),(0,f.jsx)(d,{title:n,description:r}),i]})}function m({onEdit:e,onDelete:t}){return(0,f.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[(0,f.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),e()},className:`p-1.5 rounded-lg text-[var(--color-text-muted)] hover:bg-[var(--color-accent-soft)] hover:text-[var(--color-accent-ink)] transition-colors`,"aria-label":`Edit`,children:(0,f.jsx)(i,{className:`w-3.5 h-3.5`})}),t&&(0,f.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),t()},className:`p-1.5 rounded-lg text-[var(--color-text-muted)] hover:bg-red-50 dark:hover:bg-red-950/40 hover:text-[var(--color-error)] transition-colors`,"aria-label":`Delete`,children:(0,f.jsx)(o,{className:`w-3.5 h-3.5`})})]})}function h({code:e}){return(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`label`,{className:`block text-sm font-medium text-[var(--color-text-primary)] mb-1.5`,children:`Code`}),(0,f.jsx)(`div`,{className:`flex items-center h-10 px-3 rounded-lg border border-dashed border-[var(--color-border)] bg-[var(--color-background)]`,children:e?(0,f.jsx)(`span`,{className:`text-[13px] font-mono text-[var(--color-text-secondary)]`,children:e}):(0,f.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[13px] text-[var(--color-text-muted)]`,children:[(0,f.jsx)(a,{className:`w-3.5 h-3.5 text-[var(--color-accent-dark)]`}),`Auto-generated on save`]})})]})}function g({checked:e,onChange:t}){return(0,f.jsx)(u,{checked:e,onChange:t,size:`sm`})}function _({type:e,label:t}){let r=e===`central`,i=r?n:c;return(0,f.jsxs)(`span`,{className:l(`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-md text-[11px] font-semibold`,r?`bg-[var(--color-info-bg)] text-[var(--color-primary)]`:`bg-[var(--color-accent-soft)] text-[var(--color-accent-ink)]`),children:[(0,f.jsx)(i,{className:`w-3 h-3`}),t]})}function v({url:e,count:t=1}){return e?(0,f.jsxs)(`div`,{className:`relative flex-shrink-0`,children:[(0,f.jsx)(`img`,{src:e,alt:``,className:`w-9 h-9 rounded-md object-cover border border-[var(--color-border)]`,onError:e=>{e.target.style.opacity=`0.25`}}),t>1&&(0,f.jsxs)(`span`,{className:`absolute -bottom-1 -right-1 bg-[var(--color-primary)] text-white text-[9px] font-bold rounded-full px-1 leading-[14px] min-w-[14px] text-center`,children:[`+`,t-1]})]}):(0,f.jsx)(`div`,{className:`w-9 h-9 rounded-md bg-[var(--color-background)] border border-dashed border-[var(--color-border)] grid place-items-center flex-shrink-0`,title:`No image`,children:(0,f.jsx)(r,{className:`w-4 h-4 text-[var(--color-text-muted)]`})})}function y(e){let t=typeof e==`string`?parseFloat(e):e;return Number.isNaN(t)?`—`:`₹`+t.toLocaleString(`en-IN`,{minimumFractionDigits:2,maximumFractionDigits:2})}export{m as a,v as i,h as n,_ as o,p as r,y as s,g as t};