1import{i as y,u as x,c as v,w as _,a as e,o as r,b as c,F as C,r as L,h as i,p as m,v as g,e as k,d as T}from"./app-GD5SPTnX.js";import{_ as V}from"./PageEditor-DbJ_Pa-7.js";import"./AdminLayout-CA4gy6VQ.js";import"./utils-CDfTiGpJ.js";const j={class:"space-y-2"},A={class:"flex flex-col gap-0.5 flex-shrink-0"},B=["onClick","disabled"],F=["onClick","disabled"],N=["onUpdate:modelValue"],U=["onUpdate:modelValue"],$=["onClick"],O={key:0,class:"border border-dashed border-white/10 rounded p-6 text-center text-sm text-white/30"},S={class:"mt-3 px-3 py-2.5 bg-white/5 border border-white/10 rounded text-sm text-white/50"},D=["href"],z={__name:"Links",props:{artist:Object,pageType:Object,page:Object},setup(d){const p=y("route"),o=x({props:{links:d.page.props.links??[]}}),u=x({});function h(){o.props.links.push({label:"",url:""})}function b(a,s){const n=a+s,t=o.props.links;[t[a],t[n]]=[t[n],t[a]]}function w(){o.put(p("admin.pages.update","links"))}function f(){u.post(p("admin.pages.publish","links"))}return(a,s)=>(r(),v(V,{"page-type":d.pageType,page:d.page,saving:i(o).processing,publishing:i(u).processing,onSave:w,onPublish:f},{default:_(()=>[e("div",null,[e("div",{class:"flex items-center justify-between mb-3"},[s[0]||(s[0]=e("label",{class:"text-sm font-medium text-white/70"},"Links",-1)),e("button",{type:"button",onClick:h,class:"text-xs text-white/50 hover:text-white"},"+ Add Link")]),e("div",j,[(r(!0),c(C,null,L(i(o).props.links,(n,t)=>(r(),c("div",{key:t,class:"flex items-center gap-2"},[e("div",A,[e("button",{type:"button",onClick:l=>b(t,-1),disabled:t===0,class:"text-white/20 hover:text-white disabled:opacity-20 disabled:cursor-not-allowed leading-none"},"â²",8,B),e("button",{type:"button",onClick:l=>b(t,1),disabled:t===i(o).props.links.length-1,class:"text-white/20 hover:text-white disabled:opacity-20 disabled:cursor-not-allowed leading-none"},"â¼",8,F)]),m(e("input",{"onUpdate:modelValue":l=>n.label=l,type:"text",placeholder:"Label",class:"w-40 bg-gray-900 border border-white/20 rounded px-3 py-2 text-sm text-white focus:outline-none focus:border-white/50"},null,8,N),[[g,n.label]]),m(e("input",{"onUpdate:modelValue":l=>n.url=l,type:"url",placeholder:"https://...",class:"flex-1 bg-gray-900 border border-white/20 rounded px-3 py-2 text-sm text-white focus:outline-none focus:border-white/50"},null,8,U),[[g,n.url]]),e("button",{type:"button",onClick:l=>i(o).props.links.splice(t,1),class:"text-white/20 hover:text-red-400"},"â",8,$)]))),128)),i(o).props.links.length===0?(r(),c("div",O,[s[1]||(s[1]=k(" No links yet. ",-1)),e("button",{type:"button",onClick:h,class:"text-white/50 hover:text-white ml-1"},"Add one â")])):T("",!0)]),s[3]||(s[3]=e("p",{class:"mt-2 text-xs text-white/30"},"These appear on your public /links page â great for your social media bio.",-1)),e("div",S,[s[2]||(s[2]=k(" Looking to add social media links (Instagram, TikTok, Spotify, etc.)? ",-1)),e("a",{href:i(p)("admin.pages.edit","about"),class:"text-white/80 underline hover:text-white"},"Add them on the About page â",8,D)])])]),_:1},8,["page-type","page","saving","publishing"]))}};export{z 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.